* [PATCH] ucb1400_core: avoid calling platform_device_put() twice in ucb1400_core_probe error path
@ 2010-08-03 8:34 Axel Lin
2010-08-03 10:34 ` Samuel Ortiz
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2010-08-03 8:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Samuel Ortiz, Marek Vasut
In the case of goto err2, what we want is to call
platform_device_del() instead of platform_device_unregister().
Otherwise, we call platform_device_put() twice.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/ucb1400_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c
index dbe2801..d73f84b 100644
--- a/drivers/mfd/ucb1400_core.c
+++ b/drivers/mfd/ucb1400_core.c
@@ -114,7 +114,7 @@ static int ucb1400_core_probe(struct device *dev)
err3:
platform_device_put(ucb->ucb1400_ts);
err2:
- platform_device_unregister(ucb->ucb1400_gpio);
+ platform_device_del(ucb->ucb1400_gpio);
err1:
platform_device_put(ucb->ucb1400_gpio);
err0:
--
1.5.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ucb1400_core: avoid calling platform_device_put() twice in ucb1400_core_probe error path
2010-08-03 8:34 [PATCH] ucb1400_core: avoid calling platform_device_put() twice in ucb1400_core_probe error path Axel Lin
@ 2010-08-03 10:34 ` Samuel Ortiz
2010-08-03 11:23 ` Marek Vasut
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Ortiz @ 2010-08-03 10:34 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Marek Vasut
On Tue, Aug 03, 2010 at 04:34:13PM +0800, Axel Lin wrote:
> In the case of goto err2, what we want is to call
> platform_device_del() instead of platform_device_unregister().
> Otherwise, we call platform_device_put() twice.
Patch applied, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ucb1400_core: avoid calling platform_device_put() twice in ucb1400_core_probe error path
2010-08-03 10:34 ` Samuel Ortiz
@ 2010-08-03 11:23 ` Marek Vasut
0 siblings, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2010-08-03 11:23 UTC (permalink / raw)
To: Samuel Ortiz, Axel Lin; +Cc: linux-kernel, Marek Vasut
----- Původní zpráva -----
> On Tue, Aug 03, 2010 at 04:34:13PM +0800, Axel Lin wrote:
> > In the case of goto err2, what we want is to call
> > platform_device_del() instead of platform_device_unregister().
> > Otherwise, we call platform_device_put() twice.
> Patch applied, thanks.
>
Thanks guys, good catch!
Cheers
> Cheers,
> Samuel.
>
> --
> Intel Open Source Technology Centre
> http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-03 11:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 8:34 [PATCH] ucb1400_core: avoid calling platform_device_put() twice in ucb1400_core_probe error path Axel Lin
2010-08-03 10:34 ` Samuel Ortiz
2010-08-03 11:23 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox