projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6ea21e
)
regulator: fix device_register() error handling
author
Vasiliy Kulikov
<segooon@gmail.com>
Sun, 19 Sep 2010 12:55:01 +0000
(16:55 +0400)
committer
Liam Girdwood
<lrg@slimlogic.co.uk>
Sat, 2 Oct 2010 11:50:30 +0000
(12:50 +0100)
If device_register() fails then call put_device().
See comment to device_register.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index 422a709d271d51d593899db82b0b930cf93f2847..a43eedb214bb3f1d5968fc56243cc0b7f97179de 100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-2302,8
+2302,10
@@
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
dev_set_name(&rdev->dev, "regulator.%d",
atomic_inc_return(®ulator_no) - 1);
ret = device_register(&rdev->dev);
- if (ret != 0)
+ if (ret != 0) {
+ put_device(&rdev->dev);
goto clean;
+ }
dev_set_drvdata(&rdev->dev, rdev);