mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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

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®