summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-31 07:51:18 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2013-11-04 11:49:56 (GMT)
commit5e1109adde6acd0f3424886da09402ac22ed244b (patch)
tree834319d549c6b41b94c3794366c028f435b15ba9 /drivers/pinctrl
parent9a4864c897549e048b582372eca36e967b87784c (diff)
downloadlinux-5e1109adde6acd0f3424886da09402ac22ed244b.tar.xz
pinctrl: imx1: fix return value check in imx1_pinctrl_core_probe()
In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-imx1-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c
index 4d5a9e7..f77914a 100644
--- a/drivers/pinctrl/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/pinctrl-imx1-core.c
@@ -615,8 +615,8 @@ int imx1_pinctrl_core_probe(struct platform_device *pdev,
ipctl->base = devm_ioremap_nocache(&pdev->dev, res->start,
resource_size(res));
- if (IS_ERR(ipctl->base))
- return PTR_ERR(ipctl->base);
+ if (!ipctl->base)
+ return -ENOMEM;
pctl_desc = &imx1_pinctrl_desc;
pctl_desc->name = dev_name(&pdev->dev);