drm/panel: Delete panel on mipi_dsi_attach() failure
authorBrian Norris <briannorris@chromium.org>
Fri, 24 Sep 2021 00:33:55 +0000 (17:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:22 +0000 (11:04 +0100)
commit57347363de0bc55adb5dbb3f2f5739f3f38d9b63
tree33fffd17b242c108cddceb4d5a2b61584c39906f
parent493c7d56ac22bcea643750ffb8dcbda8a62b5472
drm/panel: Delete panel on mipi_dsi_attach() failure

[ Upstream commit 9bf7123bb07f98dc76acb5daa91248e6f95713cb ]

Many DSI panel drivers fail to clean up their panel references on
mipi_dsi_attach() failure, so we're leaving a dangling drm_panel
reference to freed memory. Clean that up on failure.

Noticed by inspection, after seeing similar problems on other drivers.
Therefore, I'm not marking Fixes/stable.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210923173336.3.If9e74fa9b1d6eaa9e0e5b95b2b957b992740251c@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
drivers/gpu/drm/panel/panel-novatek-nt36672a.c
drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c
drivers/gpu/drm/panel/panel-samsung-sofef00.c
drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c