From: Brian Norris <briannorris@chromium.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: dri-devel@lists.freedesktop.org,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Damon Ding <damon.ding@rock-chips.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Heiko Stuebner <heiko@sntech.de>,
Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH] drm/bridge: analogix_dp: Fix runtime PM reference leak in set_bridge
Date: Thu, 19 Nov 2026 10:02:47 -0800 [thread overview]
Message-ID: <av85x_6VV1qcsUgh@google.com> (raw)
In-Reply-To: <20261119093347.1159198-1-m.szyprowski@samsung.com>
On Thu, Nov 19, 2026 at 10:33:46AM +0100, Marek Szyprowski wrote:
> analogix_dp_set_bridge() takes a runtime PM reference at the beginning,
> but returns directly without dropping it when
> analogix_dp_init_analog_func() fails. Jump to the common error path
> instead, which drops the reference.
>
> Fixes: 3efe2ace7f5b ("drm/bridge: analogix_dp: move basic controller init into runtime PM")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 022acb962b7c..84951413012b 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -998,7 +998,7 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp)
>
> ret = analogix_dp_init_analog_func(dp);
This function never fails, in fact. So this patch is just an academic
exercise.
Personally, I'd prefer you just make analogix_dp_init_analog_func()
return void, to simplify things.
Brian
> if (ret)
> - return ret;
> + goto out_dp_init;
>
> /*
> * According to DP spec v1.3 chap 3.5.1.2 Link Training,
> --
> 2.43.0
>
prev parent reply other threads:[~2026-11-19 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261119093353eucas1p1de9688c7e1847ae8266690934b09f925@eucas1p1.samsung.com>
2026-11-19 9:33 ` [PATCH] drm/bridge: analogix_dp: Fix runtime PM reference leak in set_bridge Marek Szyprowski
2026-11-19 18:02 ` Brian Norris [this message]
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=av85x_6VV1qcsUgh@google.com \
--to=briannorris@chromium.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=andrzej.hajda@intel.com \
--cc=damon.ding@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=luca.ceresoli@bootlin.com \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--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