diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2019-02-26 10:11:53 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2019-04-23 13:56:46 +0200 |
commit | 7ad9db66fafb0f0ad53fd2a66217105da5ddeffe (patch) | |
tree | 5e1018accc03cda3579c3c9582b4ebf4924373cb /drivers/gpu/drm/panel | |
parent | b97b042a5029e59c7f06fbc3aecda53b8eb683b0 (diff) | |
download | linux-7ad9db66fafb0f0ad53fd2a66217105da5ddeffe.tar.bz2 |
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: 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
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 265d6ca44bbb..0865f4f42115 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -3161,7 +3161,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) |