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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <c26c73d8-9b20-431e-a299-c9508ac3f6ed@web.de>
Date: Fri, 1 Mar 2024 14:10:41 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linux-media@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Biju Das <biju.das.jz@...renesas.com>,
 Hans Verkuil <hverkuil-cisco@...all.nl>,
 Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 Sakari Ailus <sakari.ailus@...ux.intel.com>,
 Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] media: rzg2l-csi2: Use common error handling code in
 rzg2l_csi2_parse_dt()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 1 Mar 2024 14:02:22 +0100

Add a label so that a bit of exception handling can be better reused
in an if branch of this function implementation.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
index e68fcdaea207..ef6922dad35f 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
@@ -671,12 +671,13 @@ static int rzg2l_csi2_parse_dt(struct rzg2l_csi2 *csi2)
 	ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
 	if (ret) {
 		dev_err(csi2->dev, "Could not parse v4l2 endpoint\n");
-		fwnode_handle_put(ep);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto put_fwnode_ep;
 	}

 	ret = rzg2l_csi2_parse_v4l2(csi2, &v4l2_ep);
 	if (ret) {
+put_fwnode_ep:
 		fwnode_handle_put(ep);
 		return ret;
 	}
--
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ