summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/panel/panel-novatek-nt35950.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index 7498fc6258bb..8b108ac80b55 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -586,7 +586,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
ret = drm_panel_of_backlight(&nt->panel);
if (ret) {
- mipi_dsi_device_unregister(nt->dsi[1]);
+ if (num_dsis == 2)
+ mipi_dsi_device_unregister(nt->dsi[1]);
return dev_err_probe(dev, ret, "Failed to get backlight\n");
}
@@ -606,7 +607,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(nt->dsi[i]);
if (ret < 0) {
/* If we fail to attach to either host, we're done */
- mipi_dsi_device_unregister(nt->dsi[1]);
+ if (num_dsis == 2)
+ mipi_dsi_device_unregister(nt->dsi[1]);
return dev_err_probe(dev, ret,
"Cannot attach to DSI%d host.\n", i);