power: supply: bq25980: Fix uninitialized wd_reg_val
PATCH 1/1 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 <[email protected]>
Signed-off-by Dan Murphy <[email protected]>
--- drivers/power/supply/bq25980_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/bq25980_charger.c +1 -1
@@ -1099,7 +1099,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;
Signature · 1 line
2.28.0.585.ge1cfff676549