Skip to content

Commit

Permalink
regulator: core: Fix regualtor_ena_gpio_free not to access pin after …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
devusr-sw-kim authored and broonie committed Dec 4, 2014
1 parent 194dbae commit 60a2362
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
Expand Down

0 comments on commit 60a2362

Please sign in to comment.