pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
PATCH 1/1 pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
pinctrl_register() returns NULL on error.
--- drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/vt8500/pinctrl-wmt.c +1 -1
@@ -588,7 +588,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, data->dev = &pdev->dev; data->pctl_dev =pinctrl_register (&wmt_desc, &pdev->dev, data); -if (IS_ERR (data->pctl_dev)) { +if (!data->pctl_dev) {dev_err (&pdev->dev,"Failed to register pinctrl\n" );return -EINVAL ; }
Signature · 1 line
1.7.10.4
Quoted 12 lines · Axel Lin
pinctrl_register()returns NULL on error.Signed-off-by Axel Lin <[email protected]>--- drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/vt8500/pinctrl-wmt.c +0
-0
drivers/pinctrl/vt8500/pinctrl-wmt.c int wmt_pinctrl_probe(struct platform_device *pdev, · line 594
Quoted 8 lines
drivers/pinctrl/vt8500/pinctrl-wmt.c +1
-1@@ -588,7 +588,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, data->dev = &pdev->dev; data->pctl_dev =pinctrl_register (&wmt_desc, &pdev->dev, data); -if (IS_ERR (data->pctl_dev)) { +if (!data->pctl_dev) {dev_err (&pdev->dev,"Failed to register pinctrl\n" );return -EINVAL ; }
Not sure why I missed this...
Linus,
If you're happy with this patch, I'll forward it on to arm-soc to go in with the rest.
Regards
Tony P
Quoted 22 lines · Tony Prisk
Quoted 12 lines · Axel Lin
pinctrl_register()returns NULL on error.Signed-off-by Axel Lin <[email protected]>--- drivers/pinctrl/vt8500/pinctrl-wmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/vt8500/pinctrl-wmt.c +0
-0drivers/pinctrl/vt8500/pinctrl-wmt.c int wmt_pinctrl_probe(struct platform_device *pdev, · line 593
Quoted 7 lines
drivers/pinctrl/vt8500/pinctrl-wmt.c +1
-1@@ -588,7 +588,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, data->dev = &pdev->dev; data->pctl_dev =pinctrl_register (&wmt_desc, &pdev->dev, data); -if (IS_ERR (data->pctl_dev)) { +if (!data->pctl_dev) {dev_err (&pdev->dev,"Failed to register pinctrl\n" );return -EINVAL ; }Not sure why I missed this...
Quoted 3 lines
Linus,
If you're happy with this patch, I'll forward it on to arm-soc to go in with the rest.
I was asked to apply this directly, and have done so (to next/drivers).
-Olof
Quoted 6 lines · Olof Johansson
Quoted 3 lines · Tony Prisk
Linus,
If you're happy with this patch, I'll forward it on to arm-soc to go in with the rest.I was asked to apply this directly, and have done so (to next/drivers).
That's cool,
Acked-by.
Yours,
Linus Walleij