aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorTom Rix <[email protected]>2020-07-12 12:23:51 -0700
committerSebastian Reichel <[email protected]>2020-07-28 02:13:21 +0200
commitccf193dee1f0fff55b556928591f7818bac1b3b1 (patch)
treeb01cfbd7d52213e3cdc3ddf0828b346fb780140b /tools/perf/scripts/python/export-to-sqlite.py
parent81bd45fc36e3d01db66c17fa5ed5f39a61e67477 (diff)
power: supply: check if calc_soc succeeded in pm860x_init_battery
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: a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x") Signed-off-by: Tom Rix <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions