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 <[email protected]> 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-f5p0ounl79wnzp...@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/[email protected]?part=1
