ARM: zx: Fix error handling
'devm_ioremap_resource()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
parent
ce34096152
commit
9cfc93b2f8
|
@ -169,7 +169,7 @@ static int zx296702_pd_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
pcubase = devm_ioremap_resource(&pdev->dev, res);
|
pcubase = devm_ioremap_resource(&pdev->dev, res);
|
||||||
if (!pcubase) {
|
if (IS_ERR(pcubase)) {
|
||||||
dev_err(&pdev->dev, "ioremap fail.\n");
|
dev_err(&pdev->dev, "ioremap fail.\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue