From d4fbca833b72cb58297df35a32cce77cd6409707 Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Tue, 6 Oct 2020 12:30:07 -0500 Subject: 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 Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel --- drivers/power/supply/bq25980_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/power/supply') 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; -- cgit v1.2.3