lkml.org 
[lkml]   [2022]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails
On Mon, Nov 14, 2022 at 06:44:46PM +0100, Sven Peter wrote:
> 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>

I think this should also automatically go to the stable tree.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
> drivers/usb/typec/tipd/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 748ff4f6b5f6..ebc786d728e2 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -827,7 +827,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)) {

thanks,

--
heikki

\
 
 \ /
  Last update: 2022-11-16 13:20    [W:0.073 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site