* [PATCH] drm/kmb: Use common error handling code in kmb_probe()
@ 2024-10-03 12:16 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-10-03 12:16 UTC (permalink / raw)
To: dri-devel, Anitha Chrisanthus, David Airlie, Edmund Dea,
Sam Ravnborg, Simona Vetter
Cc: LKML, kernel-janitors, Daniel Vetter, Thomas Zimmermann
From: Markus Elfring <elfring@users.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@users.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-03 12:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-03 12:16 [PATCH] drm/kmb: Use common error handling code in kmb_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®