Skip to content

Commit da47605

Browse files
krzkBartosz Golaszewski
authored andcommitted
gpio: mpc8xxx: Fix wakeup source leaks on device unbind
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>
1 parent 2de1cf1 commit da47605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpio/gpio-mpc8xxx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ static int mpc8xxx_probe(struct platform_device *pdev)
410410
goto err;
411411
}
412412

413-
device_init_wakeup(dev, true);
413+
ret = devm_device_init_wakeup(dev);
414+
if (ret)
415+
return dev_err_probe(dev, ret, "Failed to init wakeup\n");
414416

415417
return 0;
416418
err:

0 commit comments

Comments
 (0)