From: sashiko-bot@kernel.org
To: "Wentao Liang" <vulab@iscas.ac.cn>
Cc: dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH] drm/sun4i: Fix pdev reference leak in sun8i_r40_tcon_tv_set_mux()
Date: Wed, 16 Sep 2026 18:30:27 +0000 [thread overview]
Message-ID: <20260916183028.17C6D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916182412.2091681-1-vulab@iscas.ac.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm/sun4i: misapplied patch causes build failure
--
commit 576ab0ea69ae3e401d6153bcb00f1e660850ae75
Author: Wentao Liang <vulab@iscas.ac.cn>
drm/sun4i: Fix pdev reference leak in sun8i_r40_tcon_tv_set_mux()
This commit attempts to fix a claimed reference leak in the success path of
sun8i_r40_tcon_tv_set_mux(). However, the patch modifies the wrong function
and introduces a build failure.
Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON")
Cc: stable@vger.kernel.org
> drm/sun4i: Fix pdev reference leak in sun8i_r40_tcon_tv_set_mux()
>
> of_find_device_by_node() takes a reference to the TCON TOP device
> which the error paths release, but the success path returns without
> doing so. Drop the reference before returning success.
The commit message states it fixes a leak in sun8i_r40_tcon_tv_set_mux(),
but the patch actually modifies sun4i_tcon_init_clocks().
Looking at sun8i_r40_tcon_tv_set_mux() in the baseline, the success path
appears to fall through to the out_put_device label, which already correctly
drops the reference:
out_put_device:
put_device(&pdev->dev);
return ret;
Could the commit message be referencing an issue that does not exist in
this tree, or was the patch misapplied?
> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> index bf405a2aa3249..b5a85738876ee 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
> @@ -808,6 +808,8 @@ static int sun4i_tcon_init_clocks(struct device *dev,
> }
> }
>
> + put_device(&pdev->dev);
[Severity: Low]
Does this code compile? The variable pdev is undeclared in the scope of
sun4i_tcon_init_clocks(), which causes a build failure.
> +
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916182412.2091681-1-vulab@iscas.ac.cn?part=1
next prev parent reply other threads:[~2026-09-16 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 18:24 [PATCH] drm/sun4i: Fix pdev reference leak in sun8i_r40_tcon_tv_set_mux() Wentao Liang
2026-09-16 18:30 ` sashiko-bot [this message]
2026-09-17 13:57 ` kernel test robot
2026-09-17 20:29 ` kernel test robot
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=20260916183028.17C6D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vulab@iscas.ac.cn \
/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