forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/panel/panel-sitronix-st7701.c
....@@ -384,7 +384,15 @@
384384 st7701->dsi = dsi;
385385 st7701->desc = desc;
386386
387
- return mipi_dsi_attach(dsi);
387
+ ret = mipi_dsi_attach(dsi);
388
+ if (ret)
389
+ goto err_attach;
390
+
391
+ return 0;
392
+
393
+err_attach:
394
+ drm_panel_remove(&st7701->panel);
395
+ return ret;
388396 }
389397
390398 static int st7701_dsi_remove(struct mipi_dsi_device *dsi)