From: Myeonghun Pak <mhun512@gmail.com>
To: Alain Volmat <alain.volmat@foss.st.com>,
Raphael Gallais-Pou <rgallaispou@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Thierry Reding <treding@nvidia.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Myeonghun Pak <mhun512@gmail.com>,
Ijae Kim <ae878000@gmail.com>
Subject: [PATCH] drm/sti: dvo: Remove bridge on attach failure
Date: Wed, 29 Jul 2026 01:55:59 +0900 [thread overview]
Message-ID: <20260728165614.25847-1-mhun512@gmail.com> (raw)
drm_bridge_add() registers the bridge globally and takes a reference.
If the subsequent drm_bridge_attach() call fails, the component bind
callback returns without being considered bound, so its unbind callback is
not called. This leaves the bridge registered and its reference held.
Remove the bridge before returning the attach error.
Fixes: 384764c36116 ("drm/sti: fixup for bridge interface")
Cc: stable@vger.kernel.org
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/gpu/drm/sti/sti_dvo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 7484d3c3f4..4978e0acbf 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -459,8 +459,10 @@ static int sti_dvo_bind(struct device *dev, struct device *master, void *data)
drm_bridge_add(&dvo->bridge);
err = drm_bridge_attach(encoder, &dvo->bridge, NULL, 0);
- if (err)
+ if (err) {
+ drm_bridge_remove(&dvo->bridge);
return err;
+ }
connector->encoder = encoder;
dvo->encoder = encoder;
--
2.47.1
reply other threads:[~2026-07-28 16:56 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=20260728165614.25847-1-mhun512@gmail.com \
--to=mhun512@gmail.com \
--cc=ae878000@gmail.com \
--cc=airlied@gmail.com \
--cc=alain.volmat@foss.st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rgallaispou@gmail.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=treding@nvidia.com \
--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®