From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB

---
 kernel/drivers/gpu/drm/panel/panel-sitronix-st7701.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/kernel/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/kernel/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index 4d2a149..cd9f019 100644
--- a/kernel/drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/kernel/drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@ -384,7 +384,15 @@
 	st7701->dsi = dsi;
 	st7701->desc = desc;
 
-	return mipi_dsi_attach(dsi);
+	ret = mipi_dsi_attach(dsi);
+	if (ret)
+		goto err_attach;
+
+	return 0;
+
+err_attach:
+	drm_panel_remove(&st7701->panel);
+	return ret;
 }
 
 static int st7701_dsi_remove(struct mipi_dsi_device *dsi)

--
Gitblit v1.6.2