mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: typec: stusb160x: Use common code in stusb160x_probe()
@ 2024-06-29 14:40 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-06-29 14:40 UTC (permalink / raw)
  To: linux-usb, kernel-janitors, Amelie Delaunay, Greg Kroah-Hartman,
	Heikki Krogerus
  Cc: LKML, Jonathan Cameron, Julia Lawall

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-29 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-29 14:40 [PATCH] usb: typec: stusb160x: Use common code in stusb160x_probe() Markus Elfring

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®