Skip to content

Commit

Permalink
gpio: mpc8xxx: Fix wakeup source leaks on device unbind
Browse files Browse the repository at this point in the history
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-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
  • Loading branch information
Krzysztof Kozlowski authored and Bartosz Golaszewski committed Apr 8, 2025
1 parent 2de1cf1 commit da47605
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpio/gpio-mpc8xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ static int mpc8xxx_probe(struct platform_device *pdev)
goto err;
}

device_init_wakeup(dev, true);
ret = devm_device_init_wakeup(dev);
if (ret)
return dev_err_probe(dev, ret, "Failed to init wakeup\n");

return 0;
err:
Expand Down

0 comments on commit da47605

Please sign in to comment.