Patch "drm/imx/lcdc: fix a NULL vs IS_ERR() bug in probe" has been added to the 6.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/imx/lcdc: fix a NULL vs IS_ERR() bug in probe

to the 6.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-imx-lcdc-fix-a-null-vs-is_err-bug-in-probe.patch
and it can be found in the queue-6.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 ea8ba3e7dff013313a6a7a5fa4ed24e6f50b4d87
Author: Dan Carpenter <error27@xxxxxxxxx>
Date:   Wed Mar 22 12:06:55 2023 +0300

    drm/imx/lcdc: fix a NULL vs IS_ERR() bug in probe
    
    [ Upstream commit dae2f7b89a8436351a2982d0d96a8a56accca576 ]
    
    The devm_drm_dev_alloc() function returns error pointers.  It never
    returns NULL.  Fix the check.
    
    Fixes: c87e859cdeb5 ("drm/imx/lcdc: Implement DRM driver for imx25")
    Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
    Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/d0a1fc55-3ef6-444e-b3ef-fdc937d8d57a@kili.mountain
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
index 8e6d457917daf..277ead6a459a4 100644
--- a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
+++ b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
@@ -400,8 +400,8 @@ static int imx_lcdc_probe(struct platform_device *pdev)
 
 	lcdc = devm_drm_dev_alloc(dev, &imx_lcdc_drm_driver,
 				  struct imx_lcdc, drm);
-	if (!lcdc)
-		return -ENOMEM;
+	if (IS_ERR(lcdc))
+		return PTR_ERR(lcdc);
 
 	drm = &lcdc->drm;
 



[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