public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <yangyingliang@huawei.com>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Cc: <maz@kernel.org>
Subject: Re: [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
Date: Mon, 25 Oct 2021 07:44:27 +0000	[thread overview]
Message-ID: <ee48cd8d-49db-80f3-c09d-c65c0b8287bf@microchip.com> (raw)
In-Reply-To: <20211025050055.1129845-1-yangyingliang@huawei.com>

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@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.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
> 


  reply	other threads:[~2021-10-25  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  5:00 [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init() Yang Yingliang
2021-10-25  7:44 ` Claudiu.Beznea [this message]
2021-10-25  9:40   ` Claudiu.Beznea
2021-10-25 10:30     ` Marc Zyngier
2021-10-25  8:11 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee48cd8d-49db-80f3-c09d-c65c0b8287bf@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox