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: 3242ba117e ("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>
This commit is contained in:
parent
b9ad50d750
commit
6edb934de9
1 changed files with 1 additions and 0 deletions
|
|
@ -1014,6 +1014,7 @@ static void zynq_gpio_remove(struct platform_device *pdev)
|
|||
gpiochip_remove(&gpio->chip);
|
||||
device_set_wakeup_capable(&pdev->dev, 0);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
}
|
||||
|
||||
static struct platform_driver zynq_gpio_driver = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue