Skip to contentSkip to conversation

pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()

PATCH In review Axel Lin 4 participants 4 messages Apr 9, 2013 – Apr 15, 2013 Pin control

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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
index 14400a7..ab63104e 100644
@@ -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
#1 lore raw
Quoted 12 lines · Axel Lin

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 +0 -0
index 14400a7..ab63104e 100644

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

#2 lore raw
Quoted 22 lines · Tony Prisk
Quoted 12 lines · Axel Lin

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 +0 -0
index 14400a7..ab63104e 100644

drivers/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

#3 lore raw
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