diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-10-30 04:10:10 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2016-11-07 22:19:35 -0500 |
commit | 9cfc93b2f881e37729172938459e8b96b53ee25c (patch) | |
tree | 1173eb2c88b29e8200075b17181e8396469d2eba | |
parent | ce3409615244e15c677daeb77f3516224cfc613e (diff) |
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.c | 2 |
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) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | pcubase = devm_ioremap_resource(&pdev->dev, res); | 171 | pcubase = devm_ioremap_resource(&pdev->dev, res); |
172 | if (!pcubase) { | 172 | if (IS_ERR(pcubase)) { |
173 | dev_err(&pdev->dev, "ioremap fail.\n"); | 173 | dev_err(&pdev->dev, "ioremap fail.\n"); |
174 | return -EIO; | 174 | return -EIO; |
175 | } | 175 | } |