projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22cace9
)
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
53/31453/1
author
Seung-Woo Kim
<sw0312.kim@samsung.com>
Thu, 4 Dec 2014 09:19:19 +0000
(18:19 +0900)
committer
Seung-Woo Kim
<sw0312.kim@samsung.com>
Fri, 5 Dec 2014 02:26:03 +0000
(11:26 +0900)
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Change-Id: I690860751e45b1513fb9171bba1c0bb7e89c0446
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/regulator/core.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index
a86d123
..
a585819
100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-1532,6
+1532,8
@@
static void regulator_ena_gpio_free(struct regulator_dev *rdev)
gpio_free(pin->gpio);
list_del(&pin->list);
kfree(pin);
+ rdev->ena_pin = NULL;
+ return;
} else {
pin->request_count--;
}