From: sashiko-bot@kernel.org
To: "Johan Hovold" <johan@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] drm/panel-edp: fix i2c adapter leak on probe failure
Date: Fri, 17 Jul 2026 14:43:52 +0000 [thread overview]
Message-ID: <20260717144352.922591F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260717143119.1815106-2-johan@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The device can be left permanently powered on if the driver is unbound while an asynchronous autosuspend is pending.
--
--- Patch [1]: [PATCH v2 1/2] drm/panel-edp: fix i2c adapter leak on probe failure ---
commit 471fbc83c1856bd9eec16a225d0ec84f3032c113
Author: Johan Hovold <johan@kernel.org>
drm/panel-edp: fix i2c adapter leak on probe failure
This commit fixes a reference leak on an i2c adapter during probe failure
or driver unbind. It introduces a devres action to automatically drop the
adapter reference, streamlining the cleanup path and removing manual puts.
Link: https://lore.kernel.org/r/CAD=FV=VZPhzHU+Pet2m3L+Pqc7mOPfZC-f5p0OuNL79wNZPxRg@mail.gmail.com
> diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
> index f66474d3ef65e..775bd6af31ae7 100644
> --- a/drivers/gpu/drm/panel/panel-edp.c
> +++ b/drivers/gpu/drm/panel/panel-edp.c
[ ... ]
> @@ -983,8 +992,6 @@ static void panel_edp_remove(struct device *dev)
>
> pm_runtime_dont_use_autosuspend(dev);
> pm_runtime_disable(dev);
[Severity: High]
This is a pre-existing issue, but does this sequence leave the device
permanently powered on if unbound while an autosuspend is pending?
During probe, pm_runtime_get_sync() is followed by
pm_runtime_put_autosuspend() (e.g., in generic_edp_panel_probe()), leaving
the device in RPM_ACTIVE for 1000ms. If the driver is unbound before this
timer fires, pm_runtime_disable() cancels the pending autosuspend work
without suspending the device.
This can leave the panel regulators and GPIOs permanently enabled, and
trigger a kernel WARN_ON from devres during regulator_put() due to an
unbalanced enable count. Should there be a synchronous suspend call prior
to disabling runtime PM in the removal path?
> - if (panel->ddc && (!panel->aux || panel->ddc != &panel->aux->ddc))
> - put_device(&panel->ddc->dev);
>
> drm_edid_free(panel->drm_edid);
> panel->drm_edid = NULL;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717143119.1815106-1-johan@kernel.org?part=1
next prev parent reply other threads:[~2026-07-17 14:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 14:31 [PATCH v2 0/2] drm/panel-edp: take i2c adapter module reference Johan Hovold
2026-07-17 14:31 ` [PATCH v2 1/2] drm/panel-edp: fix i2c adapter leak on probe failure Johan Hovold
2026-07-17 14:43 ` sashiko-bot [this message]
2026-07-17 17:03 ` Doug Anderson
2026-07-20 7:46 ` Johan Hovold
2026-07-24 15:01 ` Doug Anderson
2026-07-17 14:31 ` [PATCH v2 2/2] drm/panel-edp: take i2c adapter module reference Johan Hovold
2026-07-17 17:04 ` Doug Anderson
2026-07-24 15:01 ` Doug Anderson
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=20260717144352.922591F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=johan@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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