Commit 14d653af authored by Dan Carpenter's avatar Dan Carpenter Committed by Jassi Brar

mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL

devm_ioremap() returns NULL, it never returns an ERR_PTR.

Fixes: f700e84f ('mailbox: Add support for APM X-Gene platform mailbox driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 9c384189
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment