Skip to contentSkip to conversation

usb: typec: stusb160x: Use common code in stusb160x_probe()

PATCH New Markus Elfring 1 participant 1 message Jun 29, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: typec: stusb160x: Use common code in stusb160x_probe()

From: Markus Elfring <[email protected]>
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.

---
 drivers/usb/typec/stusb160x.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/usb/typec/stusb160x.c +2 -3
index f3140fc04c12..e610f19126b7 100644
@@ -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