Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)