mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
drm/panel: simple: Fix panel_simple_dsi_probe
[ Upstream commit 7ad9db66fa ]
In case mipi_dsi_attach() fails remove the registered panel to avoid added
panel without corresponding device.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190226081153.31334-1-peter.ujfalusi@ti.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
820acbcdca
commit
98350bf52c
@@ -2371,7 +2371,14 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
|
||||
dsi->format = desc->format;
|
||||
dsi->lanes = desc->lanes;
|
||||
|
||||
return mipi_dsi_attach(dsi);
|
||||
err = mipi_dsi_attach(dsi);
|
||||
if (err) {
|
||||
struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
|
||||
|
||||
drm_panel_remove(&panel->base);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
|
||||
|
||||
Reference in New Issue
Block a user