diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2014-12-04 19:17:17 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-04 22:45:36 +0000 |
commit | 60a2362f769cf549dc466134efe71c8bf9fbaaba (patch) | |
tree | d3a28bd5639ad1b4ee53019b09c0821df24e65ac /drivers/regulator | |
parent | 194dbaefa0da24bb60d9df1c99dda807f51fc33f (diff) |
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.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-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 df2af3a11351..47a455cfe04f 100644 --- 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--; } |