lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 1 Dec 2017 16:29:43 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.co.uk>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2] power: supply: ab8500_charger: Fix an error handling
 path

Hi,

On Wed, Nov 22, 2017 at 09:27:31PM +0100, Christophe JAILLET wrote:
> '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: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/ab8500_charger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index 4ebbcce45c48..1cdbe7a0738d 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -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)
> -- 
> 2.14.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ