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 <dan.carpenter@oracle.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
bd07894e21
commit
1419d8151b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user