projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
194dbae
)
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
author
Seung-Woo Kim
<sw0312.kim@samsung.com>
Thu, 4 Dec 2014 10:17:17 +0000
(19:17 +0900)
committer
Mark Brown
<broonie@kernel.org>
Thu, 4 Dec 2014 22:45:36 +0000
(22:45 +0000)
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index df2af3a11351aaf642b2b2cacb99509c349513c7..47a455cfe04fb344409a1f48ac52a7c9450edad3 100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-1713,6
+1713,8
@@
static void regulator_ena_gpio_free(struct regulator_dev *rdev)
gpiod_put(pin->gpiod);
list_del(&pin->list);
kfree(pin);
+ rdev->ena_pin = NULL;
+ return;
} else {
pin->request_count--;
}