lkml.org 
[lkml]   [2010]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling
Date
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
>
>
>


\
 
 \ /
  Last update: 2010-07-26 09:09    [W:0.030 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site