mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 1/3] drm/panel: renesas-r61307: disable vcc on iovcc enable failure
Date: Wed,  4 Nov 2026 17:33:42 +0800	[thread overview]
Message-ID: <20261104093345.1674-2-tangbin@cmss.chinamobile.com> (raw)
In-Reply-To: <20261104093345.1674-1-tangbin@cmss.chinamobile.com>

renesas_r61307_prepare() enables vcc_supply then iovcc_supply; on iovcc
failure it returns directly, leaking vcc_supply (the matching unprepare
disables both). Route through a disable_vcc label.

Fixes: cb6c01ead1eb ("drm: panel: Add support for Renesas R61307 based MIPI DSI panel")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 53556452e..0aed970d8 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -100,7 +100,7 @@ static int renesas_r61307_prepare(struct drm_panel *panel)
 	ret = regulator_enable(priv->iovcc_supply);
 	if (ret) {
 		dev_err(dev, "failed to enable iovcc power supply\n");
-		return ret;
+		goto disable_vcc;
 	}
 
 	usleep_range(2000, 3000);
@@ -108,6 +108,10 @@ static int renesas_r61307_prepare(struct drm_panel *panel)
 	renesas_r61307_reset(priv);
 
 	return 0;
+
+disable_vcc:
+	regulator_disable(priv->vcc_supply);
+	return ret;
 }
 
 static int renesas_r61307_enable(struct drm_panel *panel)
-- 
2.52.0.windows.1




  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 [PATCH 0/3] drm: Fix resource leaks on power-on failure paths Tang Bin
2026-11-04  9:33 ` Tang Bin [this message]
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-2-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®