forked from Minki/linux
ccf193dee1
clang static analysis flags this error
88pm860x_battery.c:522:19: warning: Assigned value is
garbage or undefined [core.uninitialized.Assign]
info->start_soc = soc;
^ ~~~
soc is set by calling calc_soc.
But calc_soc can return without setting soc.
So check the return status and bail similarly to other
checks in pm860x_init_battery and initialize soc to
silence the warning.
Fixes:
|
||
---|---|---|
.. | ||
avs | ||
reset | ||
supply | ||
Kconfig | ||
Makefile |