ice: Fix missing error code in ice_ena_vfs()
Subsystems (3)
PATCH 1/1 ice: Fix missing error code in ice_ena_vfs()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'.
Eliminate the follow smatch warning:
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c:1979 ice_ena_vfs()
warn: missing error code 'ret'.
--- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +3 -1
@@ -1975,8 +1975,10 @@ static int ice_ena_vfs(struct ice_pf *pf, u16 num_vfs)clear_bit (ICE_VF_DIS , pf->state); -if (ice_eswitch_configure (pf)) +if (ice_eswitch_configure (pf)) { + ret = -EINVAL ; goto err_unroll_sriov; + }return 0 ;
Signature · 1 line
1.8.3.1
Quoted 10 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jiapeng Chong
Sent: Friday, October 15, 2021 12:04 PM
To: Brandeburg, Jesse <[email protected]>
Cc: Jiapeng Chong <[email protected]>;
netdev at vger.kernel.org; linux-kernel at vger.kernel.org; intel-wired- lan at lists.osuosl.org; kuba at kernel.org; davem at davemloft.net
Subject: [Intel-wired-lan] [PATCH] ice: Fix missing error code inice_ena_vfs()
Quoted 7 lines
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'ret'.Eliminate the follow smatch warning:
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c:1979ice_ena_vfs()
warn: missing error code 'ret'.
Seems to be already addressed by Dan Carpenter with this patch:
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20211013080012.GB6010 at kili/
Quoted 33 lines
Reported-by Abaci Robot <[email protected]>Fixes 1c54c839935b ("ice: enable/disable switchdev when managing VFs")Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +3
-2@@ -1975,8 +1975,10 @@ static int ice_ena_vfs(struct ice_pf *pf, u16 num_vfs) clear_bit(ICE_VF_DIS, pf->state); -if (ice_eswitch_configure (pf)) +if (ice_eswitch_configure (pf)) { + ret = -EINVAL ; goto err_unroll_sriov; + }return 0 ; --1.8.3.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan