Patch "drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-panel-panel-sitronix-st7701-remove-panel-on-dsi-.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c5ddb3809aecfa18fece891d5716a78b40021724
Author: Marek Vasut <marex@xxxxxxx>
Date:   Sat Oct 15 01:11:06 2022 +0200

    drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure
    
    [ Upstream commit c62102165dd79284d42383d2f7ed17301bd8e629 ]
    
    In case mipi_dsi_attach() fails, call drm_panel_remove() to
    avoid memory leak.
    
    Fixes: 849b2e3ff969 ("drm/panel: Add Sitronix ST7701 panel driver")
    Signed-off-by: Marek Vasut <marex@xxxxxxx>
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221014231106.468063-1-marex@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index 09c5d9a6f9fa..638f605acb2d 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@ -392,7 +392,15 @@ static int st7701_dsi_probe(struct mipi_dsi_device *dsi)
 	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)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux