Commit 1419d815 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

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: 3de68d33 ('pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent bd07894e
...@@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev, ...@@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
regmap = dev_get_regmap(&pdev->dev, NULL); regmap = dev_get_regmap(&pdev->dev, NULL);
if (!regmap) if (!regmap)
return PTR_ERR(regmap); return -ENODEV;
pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
if (!pctrl) if (!pctrl)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment