]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regulator: core: Actually put the gpiod after use
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 20 Apr 2019 11:34:30 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:22 +0000 (06:43 -0700)
commita973c17c5cebecc2d1b3098a19ca0c5466b8ae4d
treeb8b8c955106eb376374fa9f040972303e7184d07
parentc3bbd47c07d454ed0b7f80f51c013543ffa3e2e3
regulator: core: Actually put the gpiod after use

[ Upstream commit 78927aa40bc82f32de07323ddc1c9de07ac68180 ]

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: 541d052d7215 ("regulator: core: Only support passing enable GPIO descriptors")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/core.c