lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <B518CF98-BD06-466C-AD40-BBC4C485C3F4@opensource.wolfsonmicro.com>
Date:	Mon, 26 Jul 2010 00:07:20 -0700
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: [PATCH] wm8350-regulator: fix wm8350_register_regulator error handling

On 25 Jul 2010, at 19:41, Axel Lin <axel.lin@...il.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@...il.com>

Acked-by: Mark Brown <broonie@...nsource.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
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ