From: Tang Bin <tangbin@cmss.chinamobile.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Robert Foss <rfoss@kernel.org>, David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Tang Bin <tangbin@cmss.chinamobile.com>
Subject: [PATCH 0/3] drm: Fix resource leaks on power-on failure paths
Date: Wed, 4 Nov 2026 17:33:41 +0800 [thread overview]
Message-ID: <20261104093345.1674-1-tangbin@cmss.chinamobile.com> (raw)
This series fixes similar resource leak bugs in DRM panel and bridge
drivers.
In all three drivers, a primary resource (regulator or clock) is enabled
first, followed by a secondary resource. If enabling the secondary
resource fails, the drivers return directly without disabling the first
one. Because these resources are reference-counted and the matching
power-off/unprepare callbacks won't be triggered on failure, the
reference counts leak.
Patch 1 and 2 use goto labels to rollback the regulators. Patch 3 is a
void function and explicitly disables the leaked regulator on failure.
Tang Bin (3):
drm/panel: renesas-r61307: disable vcc on iovcc enable failure
drm/panel: otm8009a: disable supply on init_sequence failure
drm/bridge: anx6345: disable dvdd12 on dvdd25 enable failure
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 1 +
drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 6 +++++-
drivers/gpu/drm/panel/panel-renesas-r61307.c | 6 +++++-
3 files changed, 11 insertions(+), 2 deletions(-)
--
2.52.0.windows.1
next reply other threads:[~2026-11-04 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 9:33 Tang Bin [this message]
2026-11-04 9:33 ` [PATCH 1/3] drm/panel: renesas-r61307: disable vcc on iovcc enable failure Tang Bin
2026-11-04 9:33 ` [PATCH 2/3] drm/panel: otm8009a: disable supply on init_sequence failure Tang Bin
2026-11-04 9:33 ` [PATCH 3/3] drm/bridge: anx6345: disable dvdd12 on dvdd25 enable failure Tang Bin
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=20261104093345.1674-1-tangbin@cmss.chinamobile.com \
--to=tangbin@cmss.chinamobile.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.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®