mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails
[ Upstream commit19c220e9ab] 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:10eb0b6ac6("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5f125507d2
commit
7bc3379304
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user