Skip to content

Commit 309e886

Browse files
Peter Ujfalusigregkh
authored andcommitted
drm/panel: simple: Fix panel_simple_dsi_probe
[ Upstream commit 7ad9db6 ] 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>
1 parent faf9d27 commit 309e886

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/gpu/drm/panel/panel-simple.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,14 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
13891389
dsi->format = desc->format;
13901390
dsi->lanes = desc->lanes;
13911391

1392-
return mipi_dsi_attach(dsi);
1392+
err = mipi_dsi_attach(dsi);
1393+
if (err) {
1394+
struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
1395+
1396+
drm_panel_remove(&panel->base);
1397+
}
1398+
1399+
return err;
13931400
}
13941401

13951402
static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)

0 commit comments

Comments
 (0)