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]
Message-ID: <5d306cb4-a383-4efd-a3ff-add07ef28e8b@tuxon.dev>
Date: Sat, 1 Nov 2025 16:57:33 +0200
From: Claudiu Beznea <claudiu.beznea@...on.dev>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Cc: Philipp Zabel <p.zabel@...gutronix.de>, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug
 in probe



On 11/1/25 15:27, Dan Carpenter wrote:
> The devm_regmap_field_alloc() function never returns NULL, it returns
> error pointers.  Update the error checking to match.
> 
> Fixes: 58128aa88867 ("reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>

> ---
>  drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> index eea56687cd0a..4ecb9acb2641 100644
> --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> @@ -158,8 +158,8 @@ static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
>  	field.msb = __fls(args[1]);
>  
>  	pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
> -	if (!pwrrdy)
> -		return -ENOMEM;
> +	if (IS_ERR(pwrrdy))
> +		return PTR_ERR(pwrrdy);
>  
>  	rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true);
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ