* [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling
@ 2010-07-26 2:41 Axel Lin
2010-07-26 7:07 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2010-07-26 2:41 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown, Liam Girdwood
In the case of platform_device_add() fail, we should call
platform_device_put() instead of platform_device_del()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/wm8350-regulator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 723cd1f..0e6ed7d 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1495,7 +1495,7 @@ int wm8350_register_regulator(struct wm8350 *wm8350, int reg,
if (ret != 0) {
dev_err(wm8350->dev, "Failed to register regulator %d: %d\n",
reg, ret);
- platform_device_del(pdev);
+ platform_device_put(pdev);
wm8350->pmic.pdev[reg] = NULL;
}
--
1.5.4.3
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling
2010-07-26 2:41 [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling Axel Lin
@ 2010-07-26 7:07 ` Mark Brown
2010-07-27 10:35 ` Liam Girdwood
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2010-07-26 7:07 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Liam Girdwood
On 25 Jul 2010, at 19:41, Axel Lin <axel.lin@gmail.com> wrote:
> In the case of platform_device_add() fail, we should call
> platform_device_put() instead of platform_device_del()
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/regulator/wm8350-regulator.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
> index 723cd1f..0e6ed7d 100644
> --- a/drivers/regulator/wm8350-regulator.c
> +++ b/drivers/regulator/wm8350-regulator.c
> @@ -1495,7 +1495,7 @@ int wm8350_register_regulator(struct wm8350 *wm8350, int reg,
> if (ret != 0) {
> dev_err(wm8350->dev, "Failed to register regulator %d: %d\n",
> reg, ret);
> - platform_device_del(pdev);
> + platform_device_put(pdev);
> wm8350->pmic.pdev[reg] = NULL;
> }
>
> --
> 1.5.4.3
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling
2010-07-26 7:07 ` Mark Brown
@ 2010-07-27 10:35 ` Liam Girdwood
0 siblings, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2010-07-27 10:35 UTC (permalink / raw)
To: Mark Brown; +Cc: Axel Lin, linux-kernel
On Mon, 2010-07-26 at 00:07 -0700, Mark Brown wrote:
> On 25 Jul 2010, at 19:41, Axel Lin <axel.lin@gmail.com> wrote:
>
> > In the case of platform_device_add() fail, we should call
> > platform_device_put() instead of platform_device_del()
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Applied.
Thanks
Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-27 10:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-26 2:41 [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling Axel Lin
2010-07-26 7:07 ` Mark Brown
2010-07-27 10:35 ` Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®