Skip to content

Commit

Permalink
gpio: zynq: Fix wakeup source leaks on device unbind
Browse files Browse the repository at this point in the history
commit c5672e3 upstream.

Device can be unbound, so driver must also release memory for the wakeup
source.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250406202245.53854-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Krzysztof Kozlowski authored and Greg Kroah-Hartman committed Apr 25, 2025
1 parent 4009ad6 commit bbc702d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/gpio-zynq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ static int zynq_gpio_remove(struct platform_device *pdev)
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
dev_warn(&pdev->dev, "pm_runtime_get_sync() Failed\n");
device_init_wakeup(&pdev->dev, 0);
gpiochip_remove(&gpio->chip);
clk_disable_unprepare(gpio->clk);
device_set_wakeup_capable(&pdev->dev, 0);
Expand Down

0 comments on commit bbc702d

Please sign in to comment.