提交 c180d710 编写于 作者: D Dan Carpenter 提交者: Olof Johansson

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: ecc133c6 ("soc: ixp4xx: qmgr: Pass resources")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NOlof Johansson <olof@lixom.net>
上级 ab02888e
...@@ -385,8 +385,8 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev) ...@@ -385,8 +385,8 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
if (!res) if (!res)
return -ENODEV; return -ENODEV;
qmgr_regs = devm_ioremap_resource(dev, res); qmgr_regs = devm_ioremap_resource(dev, res);
if (!qmgr_regs) if (IS_ERR(qmgr_regs))
return -ENOMEM; return PTR_ERR(qmgr_regs);
irq1 = platform_get_irq(pdev, 0); irq1 = platform_get_irq(pdev, 0);
if (irq1 <= 0) if (irq1 <= 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册