Skip to content

Commit b2b4016

Browse files
ggrsMaureenHelm
authored andcommitted
drivers: charger: bq25180: fix return value check
Fix missing check of the return value of `bq25180_set_charge_current` function, resulting in logically dead code, as indicated by Coverity CID 347197. Signed-off-by: Gustavo Silva <[email protected]>
1 parent d18a7b7 commit b2b4016

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/charger/charger_bq25180.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static int bq25180_init(const struct device *dev)
263263
}
264264

265265
if (cfg->initial_current_microamp > 0) {
266-
bq25180_set_charge_current(dev, cfg->initial_current_microamp);
266+
ret = bq25180_set_charge_current(dev, cfg->initial_current_microamp);
267267
if (ret < 0) {
268268
return ret;
269269
}

0 commit comments

Comments
 (0)