diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2014-12-04 18:19:19 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2014-12-05 11:26:03 +0900 |
commit | ed56e84cfe2c1bcde50d217b4b314092c9073446 (patch) | |
tree | 3b57bd35affde04c3e01d7ce196e2fa72d357d9c | |
parent | 22cace97dfa1b8084eae8613eaa968de2e125b34 (diff) | |
download | linux-3.10-ed56e84cfe2c1bcde50d217b4b314092c9073446.tar.gz linux-3.10-ed56e84cfe2c1bcde50d217b4b314092c9073446.tar.bz2 linux-3.10-ed56e84cfe2c1bcde50d217b4b314092c9073446.zip |
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
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>
-rw-r--r-- | drivers/regulator/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index a86d1232613..a5858199101 100644 --- 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--; } |