diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-02-26 00:32:21 +0300 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2016-03-04 12:32:20 +0530 |
commit | 14d653af4e32b1ae2964e5b2847ef6be191fee64 (patch) | |
tree | 6b64321abd4c29744d8da2371aacc0df8d4ae33e | |
parent | 9c384189f5407565141f1a950d8350e56d86b4dd (diff) | |
download | linux-14d653af4e32b1ae2964e5b2847ef6be191fee64.tar.bz2 |
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>
-rw-r--r-- | drivers/mailbox/mailbox-xgene-slimpro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c index b5f51062b1f7..bd07f39f0692 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++) { |