summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorRidham Khurana <khurana.ridham222@gmail.com>2026-09-23 11:39:02 +0000
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-09-28 10:28:58 +0200
commitff82fc3a4a1d417dee1229681cc5285986edb1fa (patch)
treea79287c157aecbd9f4e3cf82f0c3036fdeef4968 /tools/lib/python
parent72d3fcf802c45d00b300f25b848a93c3a2bd7c7e (diff)
downloadlinux-next-ff82fc3a4a1d417dee1229681cc5285986edb1fa.tar.gz
linux-next-ff82fc3a4a1d417dee1229681cc5285986edb1fa.zip
gpio: xilinx: fix runtime PM leak on request error path
pm_runtime_get_sync() leaves the usage counter incremented even when it fails, and xgpio_request() returns the error without dropping it. gpiolib does not call ->free() when ->request() fails, so xgpio_free(), which holds the only matching pm_runtime_put(), never runs. The reference is leaked and the controller can no longer runtime-suspend, so its clock stays enabled. Switch to pm_runtime_resume_and_get(), which only increments the usage counter on success. Fixes: 26b04774621e ("gpio: gpio-xilinx: Add support for suspend and resume") Cc: stable@vger.kernel.org Signed-off-by: Ridham Khurana <khurana.ridham222@gmail.com> Link: https://patch.msgid.link/20260923113905.1409290-1-khurana.ridham222@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions