Patch "drm/msm/hdmi: fix error check return value of irq_of_parse_and_map()" has been added to the 5.15-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/msm/hdmi: fix error check return value of irq_of_parse_and_map()

to the 5.15-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-msm-hdmi-fix-error-check-return-value-of-irq_of_.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 9cd296d947b0e6903d2257b51ab577910c32943c
Author: Lv Ruyi <lv.ruyi@xxxxxxxxxx>
Date:   Mon Apr 25 09:18:31 2022 +0000

    drm/msm/hdmi: fix error check return value of irq_of_parse_and_map()
    
    [ Upstream commit 03371e4fbdeb7f596cbceacb59e474248b6d95ac ]
    
    The irq_of_parse_and_map() function returns 0 on failure, and does not
    return a negative value anyhow, so never enter this conditional branch.
    
    Fixes: f6a8eaca0ea1 ("drm/msm/mdp5: use irqdomains")
    Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
    Signed-off-by: Lv Ruyi <lv.ruyi@xxxxxxxxxx>
    Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/483294/
    Link: https://lore.kernel.org/r/20220425091831.3500487-1-lv.ruyi@xxxxxxxxxx
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index c3d95e7af1e4..23fb88b53324 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -319,9 +319,9 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,
 	drm_connector_attach_encoder(hdmi->connector, hdmi->encoder);
 
 	hdmi->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
-	if (hdmi->irq < 0) {
-		ret = hdmi->irq;
-		DRM_DEV_ERROR(dev->dev, "failed to get irq: %d\n", ret);
+	if (!hdmi->irq) {
+		ret = -EINVAL;
+		DRM_DEV_ERROR(dev->dev, "failed to get irq\n");
 		goto fail;
 	}
 



[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