mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 20:42:52 +00:00
power: supply: ab8500_charger: Fix an error handling path
[ Upstream commitbf59fddde1] 'ret' is know to be 0 at this point, because it has not been updated by the the previous call to 'abx500_mask_and_set_register_interruptible()'. Fix it by updating 'ret' before checking if an error occurred. Fixes:84edbeeab6("ab8500-charger: AB8500 charger driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fadaf42403
commit
4e074cd932
@@ -3218,7 +3218,7 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
|
||||
}
|
||||
|
||||
/* Enable backup battery charging */
|
||||
abx500_mask_and_set_register_interruptible(di->dev,
|
||||
ret = abx500_mask_and_set_register_interruptible(di->dev,
|
||||
AB8500_RTC, AB8500_RTC_CTRL_REG,
|
||||
RTC_BUP_CH_ENA, RTC_BUP_CH_ENA);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user