Patch "drm/exynos: fix a potential error pointer dereference" has been added to the 6.6-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/exynos: fix a potential error pointer dereference

to the 6.6-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-exynos-fix-a-potential-error-pointer-dereference.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 79a0866327606667005a27570bf1ff0446ddfb90
Author: Xiang Yang <xiangyang3@xxxxxxxxxx>
Date:   Sat Aug 12 14:27:48 2023 +0800

    drm/exynos: fix a potential error pointer dereference
    
    [ Upstream commit 73bf1c9ae6c054c53b8e84452c5e46f86dd28246 ]
    
    Smatch reports the warning below:
    drivers/gpu/drm/exynos/exynos_hdmi.c:1864 hdmi_bind()
    error: 'crtc' dereferencing possible ERR_PTR()
    
    The return value of exynos_drm_crtc_get_by_type maybe ERR_PTR(-ENODEV),
    which can not be used directly. Fix this by checking the return value
    before using it.
    
    Signed-off-by: Xiang Yang <xiangyang3@xxxxxxxxxx>
    Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index f3aaa4ea3e68..dd9903eab563 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1861,6 +1861,8 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
 		return ret;
 
 	crtc = exynos_drm_crtc_get_by_type(drm_dev, EXYNOS_DISPLAY_TYPE_HDMI);
+	if (IS_ERR(crtc))
+		return PTR_ERR(crtc);
 	crtc->pipe_clk = &hdata->phy_clk;
 
 	ret = hdmi_create_connector(encoder);




[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