devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: fix return value in bcm2835_pinctrl_probe()
@ 2012-10-07 14:01 Wei Yongjun
  2012-10-09  2:22 ` Stephen Warren
       [not found] ` <CAPgLHd8F99f5LVS-wNekKA+a1369RfqCa-w_jHGV-_Wueg_cTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2012-10-07 14:01 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

In case of error, the function pinctrl_register() returns
NULL not ERR_PTR(). The PTR_ERR() in the return value
should be replaced with error no.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
---
 drivers/pinctrl/pinctrl-bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c
index a4adee6..1f9a878 100644
--- a/drivers/pinctrl/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/pinctrl-bcm2835.c
@@ -1032,7 +1032,7 @@ static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev)
 	pc->pctl_dev = pinctrl_register(&bcm2835_pinctrl_desc, dev, pc);
 	if (!pc->pctl_dev) {
 		gpiochip_remove(&pc->gpio_chip);
-		return PTR_ERR(pc->pctl_dev);
+		return -EINVAL;
 	}
 
 	pc->gpio_range = bcm2835_pinctrl_gpio_range;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: fix return value in bcm2835_pinctrl_probe()
  2012-10-07 14:01 [PATCH] pinctrl: fix return value in bcm2835_pinctrl_probe() Wei Yongjun
@ 2012-10-09  2:22 ` Stephen Warren
       [not found] ` <CAPgLHd8F99f5LVS-wNekKA+a1369RfqCa-w_jHGV-_Wueg_cTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2012-10-09  2:22 UTC (permalink / raw)
  To: linus.walleij
  Cc: Wei Yongjun, grant.likely, rob.herring, yongjun_wei,
	linux-rpi-kernel, devicetree-discuss, linux-kernel

On 10/07/2012 08:01 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> In case of error, the function pinctrl_register() returns
> NULL not ERR_PTR(). The PTR_ERR() in the return value
> should be replaced with error no.
> 
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)

Linus, I assume this will go through the pinctrl tree.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: fix return value in bcm2835_pinctrl_probe()
       [not found] ` <CAPgLHd8F99f5LVS-wNekKA+a1369RfqCa-w_jHGV-_Wueg_cTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-10-10  6:46   ` Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-10-10  6:46 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sun, Oct 7, 2012 at 4:01 PM, Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> In case of error, the function pinctrl_register() returns
> NULL not ERR_PTR(). The PTR_ERR() in the return value
> should be replaced with error no.
>
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
>
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>

Applied with Stephen's ACK.

Thanks!
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-10  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07 14:01 [PATCH] pinctrl: fix return value in bcm2835_pinctrl_probe() Wei Yongjun
2012-10-09  2:22 ` Stephen Warren
     [not found] ` <CAPgLHd8F99f5LVS-wNekKA+a1369RfqCa-w_jHGV-_Wueg_cTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-10  6:46   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).