* [patch] mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL
@ 2016-02-25 21:32 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-02-25 21:32 UTC (permalink / raw)
To: Jassi Brar, Duc Dang; +Cc: linux-kernel, kernel-janitors
devm_ioremap() returns NULL, it never returns an ERR_PTR.
Fixes: f700e84f417b ('mailbox: Add support for APM X-Gene platform mailbox driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c
index b5f5106..bd07f39 100644
--- a/drivers/mailbox/mailbox-xgene-slimpro.c
+++ b/drivers/mailbox/mailbox-xgene-slimpro.c
@@ -196,8 +196,8 @@ static int slimpro_mbox_probe(struct platform_device *pdev)
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mb_base = devm_ioremap(&pdev->dev, regs->start, resource_size(regs));
- if (IS_ERR(mb_base))
- return PTR_ERR(mb_base);
+ if (!mb_base)
+ return -ENOMEM;
/* Setup mailbox links */
for (i = 0; i < MBOX_CNT; i++) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-25 21:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 21:32 [patch] mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox