Patch "bnx2x: Fix missing error code in bnx2x_iov_init_one()" has been added to the 4.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

    bnx2x: Fix missing error code in bnx2x_iov_init_one()

to the 4.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:
     bnx2x-fix-missing-error-code-in-bnx2x_iov_init_one.patch
and it can be found in the queue-4.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 491a5de73f69e039c14d03e34b417c98517daf85
Author: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
Date:   Tue May 25 19:00:12 2021 +0800

    bnx2x: Fix missing error code in bnx2x_iov_init_one()
    
    [ Upstream commit 65161c35554f7135e6656b3df1ce2c500ca0bdcf ]
    
    Eliminate the follow smatch warning:
    
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227
    bnx2x_iov_init_one() warn: missing error code 'err'.
    
    Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 55a7774e8ef5..92c965cb3633 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1245,8 +1245,10 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
 		goto failed;
 
 	/* SR-IOV capability was enabled but there are no VFs*/
-	if (iov->total == 0)
+	if (iov->total == 0) {
+		err = -EINVAL;
 		goto failed;
+	}
 
 	iov->nr_virtfn = min_t(u16, iov->total, num_vfs_param);
 



[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