Patch "power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
power-supply-ab8500_charger-bail-out-in-case-of-error-in-ab8500_charger_init_hw_registers.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Fri Mar 16 15:11:07 CET 2018
From: Christophe JAILLET <[email protected]>
Date: Wed, 22 Nov 2017 21:31:20 +0100
Subject: power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'
From: Christophe JAILLET <[email protected]>
[ Upstream commit 09edcb647542487864e23aa8d2ef26be3e08978a ]
If an error occurs when we enable the backup battery charging, we should go through the error handling path directly.
Before commit db43e6c473b5 ("ab8500-bm: Add usb power path support") this was the case, but this commit has added some code between the last test and the 'out' label.
So, in case of error, this added code is executed and the error may be silently ignored.
Fix it by adding the missing 'goto out', as done in all other error handling paths.
--- drivers/power/supply/ab8500_charger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/power/supply/ab8500_charger.c +3 -1
@@ -3221,8 +3221,10 @@ static int ab8500_charger_init_hw_regist 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 ) +if (ret <0 ) {dev_err (di->dev,"%s mask and set failed\n" , __func__); + goto out; + }if (is_ab8540 (di->parent)) { ret = abx500_mask_and_set_register_interruptible(di->dev,
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/power-supply-ab8500_charger-fix-an-error-handling-path.patch queue-4.15/power-supply-ab8500_charger-bail-out-in-case-of-error-in-ab8500_charger_init_hw_registers.patch