Patch "fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()" has been added to the 5.10-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

    fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()

to the 5.10-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:
     fbdev-omapfb-lcd_mipid-fix-an-error-handling-path-in.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 8a1e222bddaa49697f6e2a74003c86ea9109a884
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Sun Jun 4 17:42:28 2023 +0200

    fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
    
    [ Upstream commit 79a3908d1ea6c35157a6d907b1a9d8ec06015e7a ]
    
    If 'mipid_detect()' fails, we must free 'md' to avoid a memory leak.
    
    Fixes: 66d2f99d0bb5 ("omapfb: add support for MIPI-DCS compatible LCDs")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Signed-off-by: Helge Deller <deller@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index a75ae0c9b14c7..d1cd8785d011d 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -563,11 +563,15 @@ static int mipid_spi_probe(struct spi_device *spi)
 
 	r = mipid_detect(md);
 	if (r < 0)
-		return r;
+		goto free_md;
 
 	omapfb_register_panel(&md->panel);
 
 	return 0;
+
+free_md:
+	kfree(md);
+	return r;
 }
 
 static int mipid_spi_remove(struct spi_device *spi)



[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