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: <591377f6-1926-49df-a1cf-6b621244a710@web.de>
Date: Thu, 3 Oct 2024 14:16:49 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: dri-devel@...ts.freedesktop.org,
 Anitha Chrisanthus <anitha.chrisanthus@...el.com>,
 David Airlie <airlied@...il.com>, Edmund Dea <edmund.j.dea@...el.com>,
 Sam Ravnborg <sam@...nborg.org>, Simona Vetter <simona@...ll.ch>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org,
 Daniel Vetter <daniel@...ll.ch>, Thomas Zimmermann <tzimmermann@...e.de>
Subject: [PATCH] drm/kmb: Use common error handling code in kmb_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 3 Oct 2024 13:20:05 +0200

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

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/gpu/drm/kmb/kmb_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c
index 169b83987ce2..2680afa684a2 100644
--- a/drivers/gpu/drm/kmb/kmb_drv.c
+++ b/drivers/gpu/drm/kmb/kmb_drv.c
@@ -498,16 +498,16 @@ static int kmb_probe(struct platform_device *pdev)
 	}
 	dsi_node = of_graph_get_remote_port_parent(dsi_in);
 	if (!dsi_node) {
-		of_node_put(dsi_in);
 		DRM_ERROR("Failed to get dsi node from DT\n");
-		return -EINVAL;
+		goto err_put_dsi_in;
 	}

 	dsi_pdev = of_find_device_by_node(dsi_node);
 	if (!dsi_pdev) {
-		of_node_put(dsi_in);
 		of_node_put(dsi_node);
 		DRM_ERROR("Failed to get dsi platform device\n");
+err_put_dsi_in:
+		of_node_put(dsi_in);
 		return -EINVAL;
 	}

--
2.46.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ