projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcda432
)
regulator: Fix checking return value of create_regulator
author
Axel Lin
<axel.lin@gmail.com>
Thu, 29 Dec 2011 09:03:20 +0000
(17:03 +0800)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Thu, 29 Dec 2011 10:40:19 +0000
(10:40 +0000)
create_regulator() returns NULL on fail.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index 6cb9d399affdd587d97323b6c0ca1889abfb3ed8..e70e15c4aa284ede391e6bc6cd31a1b92e719bf9 100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-985,9
+985,8
@@
static int set_supply(struct regulator_dev *rdev,
rdev_info(rdev, "supplied by %s\n", rdev_get_name(supply_rdev));
rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY");
- if (IS_ERR(rdev->supply)) {
- err = PTR_ERR(rdev->supply);
- rdev->supply = NULL;
+ if (rdev->supply == NULL) {
+ err = -ENOMEM;
return err;
}