summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-02-26 00:32:21 +0300
committerJassi Brar <jaswinder.singh@linaro.org>2016-03-04 12:32:20 +0530
commit14d653af4e32b1ae2964e5b2847ef6be191fee64 (patch)
tree6b64321abd4c29744d8da2371aacc0df8d4ae33e /drivers
parent9c384189f5407565141f1a950d8350e56d86b4dd (diff)
downloadop-kernel-dev-14d653af4e32b1ae2964e5b2847ef6be191fee64.zip
op-kernel-dev-14d653af4e32b1ae2964e5b2847ef6be191fee64.tar.gz
mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL
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> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mailbox/mailbox-xgene-slimpro.c4
1 files changed, 2 insertions, 2 deletions
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++) {
OpenPOWER on IntegriCloud