bnx2x: Fix missing error code in bnx2x_iov_init_one()
PATCH 1/1 bnx2x: Fix missing error code in bnx2x_iov_init_one()
Eliminate the follow smatch warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227 bnx2x_iov_init_one() warn: missing error code 'err'.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +3 -1
@@ -1223,8 +1223,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);
Signature · 1 line
1.8.3.1
Sudarsana Reddy Kalluru
maintainerQuoted 10 lines
-----Original Message-----
From: Jiapeng Chong <[email protected]>
Sent: Tuesday, May 25, 2021 4:30 PM
To: Ariel Elior <[email protected]>
Cc: Sudarsana Reddy Kalluru <[email protected]>; GR-everest-linux-l2 <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Jiapeng Chong <[email protected]>
Subject: [PATCH] bnx2x: Fix missing error code inbnx2x_iov_init_one()
Quoted 4 lines
Eliminate the follow smatch warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227bnx2x_iov_init_one()warn: missing error code 'err'.
Not sure if it's false positive, variable 'err' is initialized at line 1195. 1194
1195 err = -EIO;
1196 /* verify ari is enabled */
[Changes look ok though]
Quoted 27 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +3
-2@@ -1223,8 +1223,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); --1.8.3.1
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 9 lines · On Tue, 25 May 2021 19:00:12 +0800 you wrote:
Eliminate the follow smatch warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227bnx2x_iov_init_one()warn: missing error code 'err'.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>[...]
Here is the summary with links:
- bnx2x: Fix missing error code in bnx2x_iov_init_one()
https://git.kernel.org/netdev/net/c/65161c35554f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html