power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on error
authorHans de Goede <hdegoede@redhat.com>
Wed, 14 Dec 2016 16:38:50 +0000 (17:38 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 4 Jan 2017 20:59:08 +0000 (21:59 +0100)
commit6f074bc878dc9b00c0df0bf3a8cb1d9e294cd881
tree808e014564adab1d9558d2ee62fa4b254def4865
parent94c7073fe32a3254ac6bd3d194aa5ea230fed5c4
power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on error

If reading the register fails, return the actual error code, instead
of the uninitialized val variable;

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/axp288_fuel_gauge.c