]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: Reset err after not finding static battery
authorYassine Oudjana <y.oudjana@protonmail.com>
Tue, 29 Mar 2022 03:34:03 +0000 (03:34 +0000)
committerSebastian Reichel <sre@kernel.org>
Wed, 13 Apr 2022 10:05:22 +0000 (12:05 +0200)
commite3c8b0b7ff40d8ae283e615413ab1c081131a863
tree247ca6778f0e8338ec6d49ef7992dc74936381f2
parentd7e7a5ecaa5c86ba0a92128cc4b7a40ea4ff7552
power: supply: Reset err after not finding static battery

Otherwise power_supply_get_battery_info always returns -ENODEV
on devices that do not have a static battery, even when a simple
battery is found.

Fixes: b651a26d8187 ("power: supply: Static data for Samsung batteries")
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c