lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5d97e724-928d-45aa-b526-ee9c0d71dfd5@web.de>
Date: Sat, 29 Jun 2024 16:40:20 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-usb@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Amelie Delaunay <amelie.delaunay@...com>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 Julia Lawall <julia.lawall@...ia.fr>
Subject: [PATCH] usb: typec: stusb160x: Use common code in stusb160x_probe()

From: Markus Elfring <elfring@...rs.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@...rs.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ