From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Günter Röck" <linux@roeck-us.net>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"RD Babiera" <rdbabiera@google.com>,
"Rob Herring" <robh@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Yu Zhe" <yuzhe@nfschina.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: typec: fusb302: Use common error handling code in fusb302_probe()
Date: Tue, 12 Mar 2024 11:18:06 +0200 [thread overview]
Message-ID: <ZfAdzsqXeO/IOY/A@kuha.fi.intel.com> (raw)
In-Reply-To: <0b89e175-47da-4e66-bb3b-a45a400dc3ae@web.de>
On Fri, Mar 01, 2024 at 05:23:25PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 1 Mar 2024 17:00:23 +0100
>
> Add a label so that a bit of exception handling can be better reused
> at the end of this function implementation.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/fusb302.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c
> index ef18a448b740..e1e030da1dec 100644
> --- a/drivers/usb/typec/tcpm/fusb302.c
> +++ b/drivers/usb/typec/tcpm/fusb302.c
> @@ -1741,10 +1741,9 @@ static int fusb302_probe(struct i2c_client *client)
>
> chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev);
> if (IS_ERR(chip->tcpm_port)) {
> - fwnode_handle_put(chip->tcpc_dev.fwnode);
> ret = dev_err_probe(dev, PTR_ERR(chip->tcpm_port),
> "cannot register tcpm port\n");
> - goto destroy_workqueue;
> + goto put_fwnode;
> }
>
> ret = request_irq(chip->gpio_int_n_irq, fusb302_irq_intn,
> @@ -1761,6 +1760,7 @@ static int fusb302_probe(struct i2c_client *client)
>
> tcpm_unregister_port:
> tcpm_unregister_port(chip->tcpm_port);
> +put_fwnode:
> fwnode_handle_put(chip->tcpc_dev.fwnode);
> destroy_workqueue:
> fusb302_debugfs_exit(chip);
> --
> 2.44.0
--
heikki
prev parent reply other threads:[~2024-03-12 9:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 16:23 [PATCH] usb: typec: fusb302: Use common error handling code in fusb302_probe() Markus Elfring
2024-03-12 9:18 ` 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=ZfAdzsqXeO/IOY/A@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=Markus.Elfring@web.de \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rdbabiera@google.com \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yuzhe@nfschina.com \
/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