From: Markus Elfring <Markus.Elfring@web.de>
To: linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org,
Amelie Delaunay <amelie.delaunay@st.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
Julia Lawall <julia.lawall@inria.fr>
Subject: [PATCH] usb: typec: stusb160x: Use common code in stusb160x_probe()
Date: Sat, 29 Jun 2024 16:40:20 +0200 [thread overview]
Message-ID: <5d97e724-928d-45aa-b526-ee9c0d71dfd5@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 29 Jun 2024 16:18:23 +0200
Replace a function call and a return statement by a status code assignment
and a goto statement so that a bit of common code can be better reused
at the end of this function implementation.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/usb/typec/stusb160x.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/typec/stusb160x.c b/drivers/usb/typec/stusb160x.c
index f3140fc04c12..e610f19126b7 100644
--- a/drivers/usb/typec/stusb160x.c
+++ b/drivers/usb/typec/stusb160x.c
@@ -777,9 +777,8 @@ static int stusb160x_probe(struct i2c_client *client)
}
}
- fwnode_handle_put(fwnode);
-
- return 0;
+ ret = 0;
+ goto fwnode_put;
role_sw_put:
if (chip->role_sw)
--
2.45.2
reply other threads:[~2024-06-29 14:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5d97e724-928d-45aa-b526-ee9c0d71dfd5@web.de \
--to=markus.elfring@web.de \
--cc=Jonathan.Cameron@Huawei.com \
--cc=amelie.delaunay@st.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=julia.lawall@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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
all inboxes | Powered by JetHome®