Skip to content

Commit aeb8753

Browse files
Wei Yongjunlinusw
authored andcommitted
pinctrl: ns2: fix return value check in ns2_pinmux_probe()
In case of error, the function pinctrl_register() returns NULL not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 14672f4 commit aeb8753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pinctrl/bcm/pinctrl-ns2-mux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,9 +1089,9 @@ static int ns2_pinmux_probe(struct platform_device *pdev)
10891089

10901090
pinctrl->pctl = pinctrl_register(&ns2_pinctrl_desc, &pdev->dev,
10911091
pinctrl);
1092-
if (!pinctrl->pctl) {
1092+
if (IS_ERR(pinctrl->pctl)) {
10931093
dev_err(&pdev->dev, "unable to register IOMUX pinctrl\n");
1094-
return -EINVAL;
1094+
return PTR_ERR(pinctrl->pctl);
10951095
}
10961096

10971097
return 0;

0 commit comments

Comments
 (0)