Skip to content

Commit 24ad993

Browse files
krzksmb49
authored andcommitted
usb: typec: tcpci: Fix wakeup source leaks on device unbind
BugLink: https://bugs.launchpad.net/bugs/2121266 [ Upstream commit 9fc5986fbcd7e1e63afb04be94cd4e8a536a4b04 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Noah Wager <noah.wager@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent f3af5f7 commit 24ad993

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/usb/typec/tcpm/tcpci_maxim_core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,10 @@ static int max_tcpci_probe(struct i2c_client *client)
537537
return dev_err_probe(&client->dev, ret,
538538
"IRQ initialization failed\n");
539539

540-
device_init_wakeup(chip->dev, true);
540+
ret = devm_device_init_wakeup(chip->dev);
541+
if (ret)
542+
return dev_err_probe(chip->dev, ret, "Failed to init wakeup\n");
543+
541544
return 0;
542545
}
543546

0 commit comments

Comments
 (0)