diff options
author | Dan Murphy <dmurphy@ti.com> | 2020-10-06 12:30:07 -0500 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2020-10-08 23:58:15 +0200 |
commit | d4fbca833b72cb58297df35a32cce77cd6409707 (patch) | |
tree | 9dd9bbf9663da061a3414698c2ce9e734cdb7f70 | |
parent | 4b464bad37c65492f03fe6cc15bdb6a9a6a5f5e7 (diff) | |
download | linux-d4fbca833b72cb58297df35a32cce77cd6409707.tar.gz linux-d4fbca833b72cb58297df35a32cce77cd6409707.tar.bz2 linux-d4fbca833b72cb58297df35a32cce77cd6409707.zip |
power: supply: bq25980: Fix uninitialized wd_reg_val
Fix the uninitialized wd_reg_val if the for..loop was not successful in
finding an appropriate match.
Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r-- | drivers/power/supply/bq25980_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/bq25980_charger.c b/drivers/power/supply/bq25980_charger.c index f04f9acdb13b..db69ec412a67 100644 --- a/drivers/power/supply/bq25980_charger.c +++ b/drivers/power/supply/bq25980_charger.c @@ -1096,7 +1096,7 @@ static int bq25980_power_supply_init(struct bq25980_device *bq, static int bq25980_hw_init(struct bq25980_device *bq) { struct power_supply_battery_info bat_info = { }; - int wd_reg_val; + int wd_reg_val = 0; int ret = 0; int curr_val; int volt_val; |