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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 25 Oct 2021 07:44:27 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <yangyingliang@...wei.com>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
CC:     <maz@...nel.org>
Subject: Re: [PATCH -next] irqchip/mchp-eic: Fix return value check in
 mchp_eic_init()

On 25.10.2021 08:00, Yang Yingliang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> In case of error, the function of_iomap() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check
> should be replaced with NULL test.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.
Reviewed-by: Claudiu Beznea <claudiu.beznea@...rochip.com>

Thank you!

> ---
>  drivers/irqchip/irq-mchp-eic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c
> index 09b7a8cdb611..c726a19837d2 100644
> --- a/drivers/irqchip/irq-mchp-eic.c
> +++ b/drivers/irqchip/irq-mchp-eic.c
> @@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
>                 return -ENOMEM;
> 
>         eic->base = of_iomap(node, 0);
> -       if (IS_ERR(eic->base)) {
> +       if (!eic->base) {
>                 ret = -ENOMEM;
>                 goto free;
>         }
> --
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ