From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Sven Peter <sven@svenpeter.dev>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails
Date: Wed, 16 Nov 2022 14:13:15 +0200 [thread overview]
Message-ID: <Y3TT23pkf3g0VC+g@kuha.fi.intel.com> (raw)
In-Reply-To: <20221114174449.34634-1-sven@svenpeter.dev>
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
prev parent reply other threads:[~2022-11-16 12:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 17:44 [PATCH 1/4] usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails Sven Peter
2022-11-14 17:44 ` [PATCH 2/4] usb: typec: tipd: Fix spurious fwnode_handle_put in error path Sven Peter
2022-11-16 12:16 ` Heikki Krogerus
2022-11-14 17:44 ` [PATCH 3/4] usb: typec: tipd: Fix typec_unregister_port error paths Sven Peter
2022-11-16 12:20 ` Heikki Krogerus
2022-11-14 17:44 ` [PATCH 4/4] usb: typec: tipd: Move tps6598x_disconnect error path to its own label Sven Peter
2022-11-16 12:30 ` Heikki Krogerus
2022-11-16 12:13 ` Heikki Krogerus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3TT23pkf3g0VC+g@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sven@svenpeter.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).