]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: zynq: fix runtime PM leak on remove
authorRuoyu Wang <ruoyuw560@gmail.com>
Tue, 9 Jun 2026 07:33:13 +0000 (15:33 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 9 Jun 2026 11:19:13 +0000 (13:19 +0200)
commit6edb934de9bda3b7abcec856eaee6fc8b4278dd1
treeace584cea97c1379a1bd19e312c5fbe3d7e6f11f
parentb9ad50d7505ebd48282ec3630258dc820fc85c81
gpio: zynq: fix runtime PM leak on remove

pm_runtime_get_sync() increments the runtime PM usage counter even when it
returns an error. zynq_gpio_remove() uses it to keep the controller active
while removing the GPIO chip, but never drops the usage counter again.

Balance the get with pm_runtime_put_noidle() after disabling runtime PM.

Fixes: 3242ba117e9b ("gpio: Add driver for Zynq GPIO controller")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Link: https://patch.msgid.link/20260609073313.5-1-ruoyuw560@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-zynq.c