From: tip-bot for Dan Carpenter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: gregory.clement@bootlin.com, tglx@linutronix.de, andrew@lunn.ch,
mingo@kernel.org, linux-kernel@vger.kernel.org,
miquel.raynal@bootlin.com, jason@lakedaemon.net,
sebastian.hesselbarth@gmail.com, marc.zyngier@arm.com,
hpa@zytor.com, dan.carpenter@oracle.com
Subject: [tip:irq/urgent] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
Date: Thu, 1 Nov 2018 04:42:51 -0700 [thread overview]
Message-ID: <tip-3424243e39e8ec138486926949e3668e7553125d@git.kernel.org> (raw)
In-Reply-To: <20181013102246.GD16086@mwanda>
Commit-ID: 3424243e39e8ec138486926949e3668e7553125d
Gitweb: https://git.kernel.org/tip/3424243e39e8ec138486926949e3668e7553125d
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Sat, 13 Oct 2018 13:22:46 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 1 Nov 2018 12:38:48 +0100
irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function
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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel-janitors@vger.kernel.org
Link: https://lkml.kernel.org/r/20181013102246.GD16086@mwanda
---
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 */
prev parent reply other threads:[~2018-11-01 11:43 UTC|newest]
Thread overview: 3+ 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
2018-11-01 11:42 ` tip-bot for Dan Carpenter [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=tip-3424243e39e8ec138486926949e3668e7553125d@git.kernel.org \
--to=tipbot@zytor.com \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@oracle.com \
--cc=gregory.clement@bootlin.com \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tglx@linutronix.de \
/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