aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-06-11 04:15:13 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-07-04 19:15:35 -0400
commit1419d8151be990f115c38deac497ad84d26434dd (patch)
tree78a79d26002afd275ba0253858511109030d9a3c /drivers/pinctrl
parentbd07894e217b174361711320be50c8308456096d (diff)
pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
We are returning success here because PTR_ERR(NULL) is zero. We should be returning -ENODEV. Fixes: 3de68d331c24 ('pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/berlin/berlin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index edf5d2fd2b22..86db2235ab00 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
320 320
321 regmap = dev_get_regmap(&pdev->dev, NULL); 321 regmap = dev_get_regmap(&pdev->dev, NULL);
322 if (!regmap) 322 if (!regmap)
323 return PTR_ERR(regmap); 323 return -ENODEV;
324 324
325 pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); 325 pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
326 if (!pctrl) 326 if (!pctrl)