Commit d4fbca83 authored by Dan Murphy's avatar Dan Murphy Committed by Sebastian Reichel

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: 5069185f ("power: supply: bq25980: Add support for the BQ259xx family")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 4b464bad
...@@ -1096,7 +1096,7 @@ static int bq25980_power_supply_init(struct bq25980_device *bq, ...@@ -1096,7 +1096,7 @@ static int bq25980_power_supply_init(struct bq25980_device *bq,
static int bq25980_hw_init(struct bq25980_device *bq) static int bq25980_hw_init(struct bq25980_device *bq)
{ {
struct power_supply_battery_info bat_info = { }; struct power_supply_battery_info bat_info = { };
int wd_reg_val; int wd_reg_val = 0;
int ret = 0; int ret = 0;
int curr_val; int curr_val;
int volt_val; int volt_val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment