diff options
author | Sven Peter <sven@svenpeter.dev> | 2022-11-14 20:44:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-22 19:28:57 +0300 |
commit | 19c220e9ab00f50edefb9667e3101e84a5112df2 (patch) | |
tree | 6793119e1373ee7f6ac193edd6a1d3fdf85026bc /drivers/usb/typec/tipd | |
parent | e99e1a7d6f88b9c54dc32671bac29f26e58bde80 (diff) | |
download | linux-19c220e9ab00f50edefb9667e3101e84a5112df2.tar.xz |
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 <sven@svenpeter.dev>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20221114174449.34634-1-sven@svenpeter.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/tipd')
-rw-r--r-- | drivers/usb/typec/tipd/core.c | 2 |
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)) { |