Commit 19c220e9 authored by Sven Peter's avatar Sven Peter Committed by Greg Kroah-Hartman

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: 10eb0b6a ("usb: typec: tps6598x: Export some power supply properties")
Signed-off-by: default avatarSven Peter <sven@svenpeter.dev>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20221114174449.34634-1-sven@svenpeter.devSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e99e1a7d
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment