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:   Thu, 3 Mar 2022 13:41:03 +0000
From:   Charles Keepax <ckeepax@...nsource.cirrus.com>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>
CC:     <sre@...nel.org>, <patches@...nsource.cirrus.com>,
        <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] power: supply: Handle error for wm8350_register_irq

On Thu, Mar 03, 2022 at 05:33:39PM +0800, Jiasheng Jiang wrote:
> As the potential failure of the wm8350_register_irq(),
> it should be better to check it and return error if fails.
> Also, use 'free_' in order to avoid same code.
> 
> Fixes: 14431aa0c5a4 ("power_supply: Add support for WM8350 PMU")
> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
> ---
> +	ret = wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD,
>  			    wm8350_charger_handler, 0, "Battery cold", wm8350);
> -	wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL,
> +	if (ret)
> +		goto free_CHG_BAT_HOT;

Probably be nicer to use non-caps for the labels, otherwise looks
good to me.

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ