浏览代码

i40e: remove logically dead code

This patch removes the !vf condition check that cannot be
true in i40e_ndo_set_vf_trust function

Detected by CoverityScan, CID 1397531 Logically dead code

Signed-off-by: Lihong Yang <lihong.yang@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Lihong Yang 8 年之前
父节点
当前提交
5872866e16
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

+ 0 - 2
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

@@ -3354,8 +3354,6 @@ int i40e_ndo_set_vf_trust(struct net_device *netdev, int vf_id, bool setting)
 
 	vf = &pf->vf[vf_id];
 
-	if (!vf)
-		return -EINVAL;
 	if (setting == vf->trusted)
 		goto out;