Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 3de68d331c24 ('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>

authored by

Dan Carpenter and committed by
Linus Walleij
1419d815 bd07894e

+1 -1
+1 -1
drivers/pinctrl/berlin/berlin.c
··· 320 320 321 321 regmap = dev_get_regmap(&pdev->dev, NULL); 322 322 if (!regmap) 323 - return PTR_ERR(regmap); 323 + return -ENODEV; 324 324 325 325 pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); 326 326 if (!pctrl)