From: Markus Elfring <Markus.Elfring@web.de>
To: dri-devel@lists.freedesktop.org,
Anitha Chrisanthus <anitha.chrisanthus@intel.com>,
David Airlie <airlied@gmail.com>,
Edmund Dea <edmund.j.dea@intel.com>,
Sam Ravnborg <sam@ravnborg.org>, Simona Vetter <simona@ffwll.ch>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH] drm/kmb: Use common error handling code in kmb_probe()
Date: Thu, 3 Oct 2024 14:16:49 +0200 [thread overview]
Message-ID: <591377f6-1926-49df-a1cf-6b621244a710@web.de> (raw)
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
reply other threads:[~2024-10-03 12:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=591377f6-1926-49df-a1cf-6b621244a710@web.de \
--to=markus.elfring@web.de \
--cc=airlied@gmail.com \
--cc=anitha.chrisanthus@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=edmund.j.dea@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®