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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220316024844.GA282154@dragon>
Date:   Wed, 16 Mar 2022 10:48:44 +0800
From:   Shawn Guo <shawn.guo@...aro.org>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel@...r.kernel.org, maz@...nel.org
Subject: Re: [PATCH -next] irqchip/irq-qcom-mpm: fix return value check in
 qcom_mpm_init()

On Wed, Mar 16, 2022 at 10:51:00AM +0800, Yang Yingliang wrote:
> If devm_platform_ioremap_resource() fails, it never returns
> NULL, replace NULL check with IS_ERR().
> 
> Fixes: a6199bb514d8 ("irqchip: Add Qualcomm MPM controller driver")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>  drivers/irqchip/irq-qcom-mpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-qcom-mpm.c b/drivers/irqchip/irq-qcom-mpm.c
> index eea5a753618c..d30614661eea 100644
> --- a/drivers/irqchip/irq-qcom-mpm.c
> +++ b/drivers/irqchip/irq-qcom-mpm.c
> @@ -375,7 +375,7 @@ static int qcom_mpm_init(struct device_node *np, struct device_node *parent)
>  	raw_spin_lock_init(&priv->lock);
>  
>  	priv->base = devm_platform_ioremap_resource(pdev, 0);
> -	if (!priv->base)
> +	if (IS_ERR(priv->base))

Oops!  Thanks for the fixing!

Acked-by: Shawn Guo <shawn.guo@...aro.org>

>  		return PTR_ERR(priv->base);
>  
>  	for (i = 0; i < priv->reg_stride; i++) {
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ