usb: typec: tcpci: 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>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250406204051.63446-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Krzysztof Kozlowski
2025-04-06 22:40:50 +02:00
committed by Greg Kroah-Hartman
parent a592e0673a
commit 9fc5986fbc
+4 -1
View File
@@ -536,7 +536,10 @@ static int max_tcpci_probe(struct i2c_client *client)
return dev_err_probe(&client->dev, ret,
"IRQ initialization failed\n");
device_init_wakeup(chip->dev, true);
ret = devm_device_init_wakeup(chip->dev);
if (ret)
return dev_err_probe(chip->dev, ret, "Failed to init wakeup\n");
return 0;
}