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: ecc133c6da ("soc: ixp4xx: qmgr: Pass resources")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
This commit is contained in:
Dan Carpenter 2019-05-06 08:31:08 +02:00 • committed by Olof Johansson
commit c180d710ee

View file

@ -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)