aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-imx1-core.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-31 03:51:18 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-11-04 06:49:56 -0500
commit5e1109adde6acd0f3424886da09402ac22ed244b (patch)
tree834319d549c6b41b94c3794366c028f435b15ba9 /drivers/pinctrl/pinctrl-imx1-core.c
parent9a4864c897549e048b582372eca36e967b87784c (diff)
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/pinctrl-imx1-core.c')
-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 4d5a9e74dc8f..f77914ac081a 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,
615 615
616 ipctl->base = devm_ioremap_nocache(&pdev->dev, res->start, 616 ipctl->base = devm_ioremap_nocache(&pdev->dev, res->start,
617 resource_size(res)); 617 resource_size(res));
618 if (IS_ERR(ipctl->base)) 618 if (!ipctl->base)
619 return PTR_ERR(ipctl->base); 619 return -ENOMEM;
620 620
621 pctl_desc = &imx1_pinctrl_desc; 621 pctl_desc = &imx1_pinctrl_desc;
622 pctl_desc->name = dev_name(&pdev->dev); 622 pctl_desc->name = dev_name(&pdev->dev);