Skip to content

Commit 78927aa

Browse files
linuswbroonie
authored andcommitted
regulator: core: Actually put the gpiod after use
I went to great lengths to hand over the management of the GPIO descriptors to the regulator core, and some stray rebased oneliner in the old patch must have been assuming the devices were still doing devres management of it. We handed the management over to the regulator core, so of course the regulator core shall issue gpiod_put() when done. Sorry for the descriptor leak. Fixes: 541d052 ("regulator: core: Only support passing enable GPIO descriptors") Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 0637730 commit 78927aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/regulator/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,7 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
22562256
if (pin->gpiod == rdev->ena_pin->gpiod) {
22572257
if (pin->request_count <= 1) {
22582258
pin->request_count = 0;
2259+
gpiod_put(pin->gpiod);
22592260
list_del(&pin->list);
22602261
kfree(pin);
22612262
rdev->ena_pin = NULL;

0 commit comments

Comments
 (0)