summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-06 08:31:08 +0200
committerOlof Johansson <olof@lixom.net>2019-05-16 10:53:11 -0700
commitc180d710ee7af111d75886a3339fc82a65d25c69 (patch)
tree9779d6bffed17cfbaf45c32e50a880bf6136785e /drivers/soc
parentab02888e39212af2d1dddc565cd67192548b9fd8 (diff)
downloadlinux-c180d710ee7af111d75886a3339fc82a65d25c69.tar.bz2
soc: ixp4xx: qmgr: Fix an NULL vs IS_ERR() check in probe
The devm_ioremap_resource() function doesn't retunr NULL, it returns error pointers. Fixes: ecc133c6da60 ("soc: ixp4xx: qmgr: Pass resources") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/ixp4xx/ixp4xx-qmgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 13a8a13c9b01..bb90670ec160 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -385,8 +385,8 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
if (!res)
return -ENODEV;
qmgr_regs = devm_ioremap_resource(dev, res);
- if (!qmgr_regs)
- return -ENOMEM;
+ if (IS_ERR(qmgr_regs))
+ return PTR_ERR(qmgr_regs);
irq1 = platform_get_irq(pdev, 0);
if (irq1 <= 0)