Skip to content

Commit

Permalink
pinctrl: berlin: fix an error code in berlin_pinctrl_probe()
Browse files Browse the repository at this point in the history
We are returning success here because PTR_ERR(NULL) is zero.  We should
be returning -ENODEV.

Fixes: 3de68d3 ('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>
  • Loading branch information
Dan Carpenter authored and Linus Walleij committed Jul 4, 2014
1 parent bd07894 commit 1419d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/berlin/berlin.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,

regmap = dev_get_regmap(&pdev->dev, NULL);
if (!regmap)
return PTR_ERR(regmap);
return -ENODEV;

pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
if (!pctrl)
Expand Down

0 comments on commit 1419d81

Please sign in to comment.