public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: palmas: Drop regulator_unregister while using devm_regulator_register
@ 2013-09-05  3:31 Axel Lin
  2013-09-05  4:11 ` Sachin Kamat
  2013-09-06 11:09 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-09-05  3:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: Sachin Kamat, Liam Girdwood, linux-kernel

Commmit af40a94aba "regulator: palmas: Use devm_regulator_register" missed
removing a regulator_unregister() call if palmas_extreg_init falis. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/palmas-regulator.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 37b1068..825f798 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -1019,10 +1019,8 @@ static int palmas_regulators_probe(struct platform_device *pdev)
 				else
 					ret = palmas_extreg_init(palmas,
 							id, reg_init);
-				if (ret) {
-					regulator_unregister(pmic->rdev[id]);
+				if (ret)
 					return ret;
-				}
 			}
 		}
 	}
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-06 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05  3:31 [PATCH] regulator: palmas: Drop regulator_unregister while using devm_regulator_register Axel Lin
2013-09-05  4:11 ` Sachin Kamat
2013-09-06 11:09 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox