Patch "drm/stm: Fix an error handling path in stm_drm_platform_probe()" has been added to the 4.19-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/stm: Fix an error handling path in stm_drm_platform_probe()

to the 4.19-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-stm-fix-an-error-handling-path-in-stm_drm_platfo.patch
and it can be found in the queue-4.19 subdirectory.

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



commit e652c43ff1f7903d8373c43df82e68376e1280ec
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Sat Jan 6 17:54:32 2024 +0100

    drm/stm: Fix an error handling path in stm_drm_platform_probe()
    
    [ Upstream commit ce7c90bfda2656418c69ba0dd8f8a7536b8928d4 ]
    
    If drm_dev_register() fails, a call to drv_load() must be undone, as
    already done in the remove function.
    
    Fixes: b759012c5fa7 ("drm/stm: Add STM32 LTDC driver")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@xxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20fff7f853f20a48a96db8ff186124470ec4d976.1704560028.git.christophe.jaillet@xxxxxxxxxx
    Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index f2021b23554d3..dade0ecdfc1a1 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -152,10 +152,12 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
 
 	ret = drm_dev_register(ddev, 0);
 	if (ret)
-		goto err_put;
+		goto err_unload;
 
 	return 0;
 
+err_unload:
+	drv_unload(ddev);
 err_put:
 	drm_dev_put(ddev);
 




[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