From: Shawn Guo <shawn.guo@linaro.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, maz@kernel.org
Subject: Re: [PATCH -next] irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init()
Date: Wed, 16 Mar 2022 10:48:44 +0800 [thread overview]
Message-ID: <20220316024844.GA282154@dragon> (raw)
In-Reply-To: <20220316025100.1758413-1-yangyingliang@huawei.com>
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@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.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@linaro.org>
> return PTR_ERR(priv->base);
>
> for (i = 0; i < priv->reg_stride; i++) {
> --
> 2.25.1
>
next prev parent reply other threads:[~2022-03-16 2:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 2:51 [PATCH -next] irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init() Yang Yingliang
2022-03-16 2:48 ` Shawn Guo [this message]
2022-03-17 15:33 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang
2022-04-05 15:40 ` [irqchip: irq/irqchip-fixes] " 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=20220316024844.GA282154@dragon \
--to=shawn.guo@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.