aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Peter <[email protected]>2022-11-14 18:44:46 +0100
committerGreg Kroah-Hartman <[email protected]>2022-11-22 17:28:57 +0100
commit19c220e9ab00f50edefb9667e3101e84a5112df2 (patch)
tree6793119e1373ee7f6ac193edd6a1d3fdf85026bc
parente99e1a7d6f88b9c54dc32671bac29f26e58bde80 (diff)
usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails
We can't just return if devm_tps6598_psy_register fails since previous resources are not devres managed and have yet to be cleaned up. Fixes: 10eb0b6ac63a ("usb: typec: tps6598x: Export some power supply properties") Signed-off-by: Sven Peter <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/typec/tipd/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 2a77bab948f5..83a7a82e55f1 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -814,7 +814,7 @@ static int tps6598x_probe(struct i2c_client *client)
ret = devm_tps6598_psy_register(tps);
if (ret)
- return ret;
+ goto err_role_put;
tps->port = typec_register_port(&client->dev, &typec_cap);
if (IS_ERR(tps->port)) {