From: Krzysztof Kozlowski Date: Sun, 6 Apr 2025 20:40:51 +0000 (+0200) Subject: usb: typec: tipd: Fix wakeup source leaks on device unbind X-Git-Tag: v6.16-rc1~28^2~124 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=aaa8f2e959341fd4a3ccf111500eb1e6176678e0;p=linux-block.git usb: typec: tipd: 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 Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250406204051.63446-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 7ee721a877c1..dcf141ada078 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -1431,7 +1431,7 @@ static int tps6598x_probe(struct i2c_client *client) tps->wakeup = device_property_read_bool(tps->dev, "wakeup-source"); if (tps->wakeup && client->irq) { - device_init_wakeup(&client->dev, true); + devm_device_init_wakeup(&client->dev); enable_irq_wake(client->irq); }