]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/bridge/panel: Fix runtime warning on panel bridge release
authorAdam Miotk <adam.miotk@arm.com>
Mon, 10 Jun 2024 10:27:39 +0000 (11:27 +0100)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Fri, 2 Aug 2024 14:26:54 +0000 (16:26 +0200)
commitd1e506a5bcaad4fc48ce2cf4cc60d2292f112374
tree973955439dd638ebc2f44e9d2ce0c78a3876ac36
parente44294998183cc36d9ef69c014e169163ef8a8a1
drm/bridge/panel: Fix runtime warning on panel bridge release

BugLink: https://bugs.launchpad.net/bugs/2074091
[ Upstream commit ce62600c4dbee8d43b02277669dd91785a9b81d9 ]

Device managed panel bridge wrappers are created by calling to
drm_panel_bridge_add_typed() and registering a release handler for
clean-up when the device gets unbound.

Since the memory for this bridge is also managed and linked to the panel
device, the release function should not try to free that memory.
Moreover, the call to devm_kfree() inside drm_panel_bridge_remove() will
fail in this case and emit a warning because the panel bridge resource
is no longer on the device resources list (it has been removed from
there before the call to release handlers).

Fixes: 67022227ffb1 ("drm/bridge: Add a devm_ allocator for panel bridge.")
Signed-off-by: Adam Miotk <adam.miotk@arm.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610102739.139852-1-adam.miotk@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
drivers/gpu/drm/bridge/panel.c