usb: typec: tipd: Fix wakeup source leaks on device unbind
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 6 Apr 2025 20:40:51 +0000 (22:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:08:32 +0000 (16:08 +0200)
Device can be unbound, so driver must also release memory for the wakeup
source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250406204051.63446-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tipd/core.c

index 7ee721a877c12d9d0380cec8a04e4aa0ae6b22af..dcf141ada07812295a6f07e41d77f95f98116010 100644 (file)
@@ -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);
        }