Patch "net/cxgb4: Check the return from t4_query_params properly" has been added to the 5.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

    net/cxgb4: Check the return from t4_query_params properly

to the 5.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:
     net-cxgb4-check-the-return-from-t4_query_params-prop.patch
and it can be found in the queue-5.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 079a1c0cf7824c245010dd4482cdaba6db4df2ce
Author: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
Date:   Tue Apr 14 12:27:08 2020 -0300

    net/cxgb4: Check the return from t4_query_params properly
    
    commit c799fca8baf18d1bbbbad6c3b736eefbde8bdb90 upstream.
    
    Positive return values are also failures that don't set val,
    although this probably can't happen. Fixes gcc 10 warning:
    
    drivers/net/ethernet/chelsio/cxgb4/t4_hw.c: In function â??t4_phy_fw_verâ??:
    drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:3747:14: warning: â??valâ?? may be used uninitialized in this function [-Wmaybe-uninitialized]
     3747 |  *phy_fw_ver = val;
    
    Fixes: 01b6961410b7 ("cxgb4: Add PHY firmware support for T420-BT cards")
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 3f6813daf3c10..31fcfc58e3373 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -3748,7 +3748,7 @@ int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver)
 		 FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_VERSION));
 	ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1,
 			      &param, &val);
-	if (ret < 0)
+	if (ret)
 		return ret;
 	*phy_fw_ver = val;
 	return 0;



[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