mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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 <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
parent
ab02888e39
commit
c180d710ee
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue