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: 3de68d331c ('pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs')
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Sebastian Hesselbarth <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Dan Carpenter 2014-06-11 11:15:13 +03:00 • committed by Linus Walleij
commit 1419d8151b

View file

@ -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)