Commit 7ad9db66 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Thierry Reding

drm/panel: simple: Fix panel_simple_dsi_probe

In case mipi_dsi_attach() fails remove the registered panel to avoid added
panel without corresponding device.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190226081153.31334-1-peter.ujfalusi@ti.com
parent b97b042a
...@@ -3161,7 +3161,14 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) ...@@ -3161,7 +3161,14 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
dsi->format = desc->format; dsi->format = desc->format;
dsi->lanes = desc->lanes; 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) static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment