mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
power: supply: gpio-charger: Fix wakeup source leaks on device unbind
Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406202730.55096-2-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
c73d19f89c
commit
51212ce953
|
|
@ -366,7 +366,9 @@ static int gpio_charger_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, gpio_charger);
|
||||
|
||||
device_init_wakeup(dev, 1);
|
||||
ret = devm_device_init_wakeup(dev);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Failed to init wakeup\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user