power: supply: sbs-battery: keep error code when get_property() fails

Commit 395a7251dc (power: supply: sbs-battery: don't assume
i2c errors as battery disconnect) overwrites the original error code
returned from internal functions. On such a sporadic i2c error,
a user will get a wrong value without errors.

Fixes: 395a7251dc (power: supply: sbs-battery: don't assume i2c errors as battery disconnect)

Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Ikjoon Jang 2020-09-03 11:04:40 +08:00 • committed by Sebastian Reichel
commit 8ae237ec0a