mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
drm/panel: ilitek-ili9881c: Clean up on mipi_dsi_attach failure
mipi_dsi_attach is allowed to fail, and currently the probe code doesn't clean up (mainly drm_panel_remove) if this happens. Add cleanup code on failure. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
1e800145c6
commit
665dfab0f0
@@ -1161,7 +1161,11 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
|
||||
dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
dsi->lanes = 4;
|
||||
|
||||
return mipi_dsi_attach(dsi);
|
||||
ret = mipi_dsi_attach(dsi);
|
||||
if (ret)
|
||||
drm_panel_remove(&ctx->panel);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ili9881c_dsi_remove(struct mipi_dsi_device *dsi)
|
||||
|
||||
Reference in New Issue
Block a user