soc: ixp4xx: npe: Fix an IS_ERR() vs NULL check in probe
The devm_ioremap_resource() function doesn't return NULL, it returns
error pointers.
Fixes: 0b458d7b10
("soc: ixp4xx: npe: Pass addresses as resources")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Родитель
140d90098f
Коммит
cd3967bee0
|
@ -695,8 +695,8 @@ static int ixp4xx_npe_probe(struct platform_device *pdev)
|
||||||
continue; /* NPE already disabled or not present */
|
continue; /* NPE already disabled or not present */
|
||||||
}
|
}
|
||||||
npe->regs = devm_ioremap_resource(dev, res);
|
npe->regs = devm_ioremap_resource(dev, res);
|
||||||
if (!npe->regs)
|
if (IS_ERR(npe->regs))
|
||||||
return -ENOMEM;
|
return PTR_ERR(npe->regs);
|
||||||
|
|
||||||
if (npe_reset(npe)) {
|
if (npe_reset(npe)) {
|
||||||
dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
|
dev_info(dev, "NPE%d at 0x%08x-0x%08x does not reset\n",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче