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:
Christophe JAILLET 2016-10-30 09:10:10 +01:00 committed by Olof Johansson
parent ce34096152
commit 9cfc93b2f8
1 changed files with 1 additions and 1 deletions

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;
}