summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-10-30 09:10:10 +0100
committerOlof Johansson <olof@lixom.net>2016-11-07 19:19:35 -0800
commit9cfc93b2f881e37729172938459e8b96b53ee25c (patch)
tree1173eb2c88b29e8200075b17181e8396469d2eba
parentce3409615244e15c677daeb77f3516224cfc613e (diff)
downloadblackbird-obmc-linux-9cfc93b2f881e37729172938459e8b96b53ee25c.tar.gz
blackbird-obmc-linux-9cfc93b2f881e37729172938459e8b96b53ee25c.zip
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>
-rw-r--r--arch/arm/mach-zx/zx296702-pm-domain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-zx/zx296702-pm-domain.c b/arch/arm/mach-zx/zx296702-pm-domain.c
index e08574d4e2ca..79dcf2549267 100644
--- a/arch/arm/mach-zx/zx296702-pm-domain.c
+++ b/arch/arm/mach-zx/zx296702-pm-domain.c
@@ -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;
}
OpenPOWER on IntegriCloud