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 <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
This commit is contained in:
Christophe JAILLET 2016-10-30 09:10:10 +01:00 • committed by Olof Johansson
commit 9cfc93b2f8

View file

@ -169,7 +169,7 @@ static int zx296702_pd_probe(struct platform_device *pdev)
}
pcubase = devm_ioremap_resource(&pdev->dev, res);
if (!pcubase) {
if (IS_ERR(pcubase)) {
dev_err(&pdev->dev, "ioremap fail.\n");
return -EIO;
}