From: miquel.raynal@bootlin.com (Miquel Raynal)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe
Date: Sun, 14 Oct 2018 18:03:24 +0200 [thread overview]
Message-ID: <20181014180324.56e7d8d5@xps13> (raw)
In-Reply-To: <20181013102246.GD16086@mwanda>
Hi Dan,
Dan Carpenter <dan.carpenter@oracle.com> wrote on Sat, 13 Oct 2018
13:22:46 +0300:
> The devm_ioremap_resource() function never returns NULL, it returns
> error pointers.
>
> Fixes: 61ce8d8d8a81 ("irqchip/irq-mvebu-sei: Add new driver for Marvell SEI")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/irqchip/irq-mvebu-sei.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-sei.c
> index 566d69a2edbc..add4c9c934c8 100644
> --- a/drivers/irqchip/irq-mvebu-sei.c
> +++ b/drivers/irqchip/irq-mvebu-sei.c
> @@ -384,9 +384,9 @@ static int mvebu_sei_probe(struct platform_device *pdev)
>
> sei->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> sei->base = devm_ioremap_resource(sei->dev, sei->res);
> - if (!sei->base) {
> + if (IS_ERR(sei->base)) {
> dev_err(sei->dev, "Failed to remap SEI resource\n");
> - return -ENODEV;
> + return PTR_ERR(sei->base);
> }
>
> /* Retrieve the SEI capabilities with the interrupt ranges */
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miqu?l
prev parent reply other threads:[~2018-10-14 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-13 10:22 [PATCH] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe Dan Carpenter
2018-10-14 16:03 ` Miquel Raynal [this message]
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=20181014180324.56e7d8d5@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).