Commit e69883b7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Luis Henriques

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

BugLink: https://launchpad.net/bugs/1625232

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>
(cherry picked from commit 14d653af)
Signed-off-by: default avatarCraig Magina <craig.magina@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 13381745
......@@ -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