Patch "drm/msm/dp: Fix incorrect NULL check kbot warnings in DP driver" 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

    drm/msm/dp: Fix incorrect NULL check kbot warnings in DP driver

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:
     drm-msm-dp-fix-incorrect-null-check-kbot-warnings-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 e6aec211ca2cda574af377ac67609596cfdb9f16
Author: Abhinav Kumar <abhinavk@xxxxxxxxxxxxxx>
Date:   Fri Mar 5 11:17:18 2021 -0800

    drm/msm/dp: Fix incorrect NULL check kbot warnings in DP driver
    
    [ Upstream commit 7d649cfe0314aad2ba18042885ab9de2f13ad809 ]
    
    Fix an incorrect NULL check reported by kbot in the MSM DP driver
    
    smatch warnings:
    drivers/gpu/drm/msm/dp/dp_hpd.c:37 dp_hpd_connect()
    error: we previously assumed 'hpd_priv->dp_cb' could be null
    (see line 37)
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Abhinav Kumar <abhinavk@xxxxxxxxxxxxxx>
    Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1614971839-2686-2-git-send-email-abhinavk@xxxxxxxxxxxxxx
    Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/dp/dp_hpd.c b/drivers/gpu/drm/msm/dp/dp_hpd.c
index 5b8fe32022b5..e1c90fa47411 100644
--- a/drivers/gpu/drm/msm/dp/dp_hpd.c
+++ b/drivers/gpu/drm/msm/dp/dp_hpd.c
@@ -34,8 +34,8 @@ int dp_hpd_connect(struct dp_usbpd *dp_usbpd, bool hpd)
 
 	dp_usbpd->hpd_high = hpd;
 
-	if (!hpd_priv->dp_cb && !hpd_priv->dp_cb->configure
-				&& !hpd_priv->dp_cb->disconnect) {
+	if (!hpd_priv->dp_cb || !hpd_priv->dp_cb->configure
+				|| !hpd_priv->dp_cb->disconnect) {
 		pr_err("hpd dp_cb not initialized\n");
 		return -EINVAL;
 	}



[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