Skip to contentSkip to conversation

i40e: remove logically dead code

PATCH New Lihong Yang 2 participants 2 messages Jul 27, 2017 – Aug 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +0 -2
index f78aa7e..a1d2391 100644
@@ -3312,8 +3312,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;
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 i40e: remove logically dead code

Quoted 10 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Lihong Yang
Sent: Thursday, July 27, 2017 3:17 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH] i40e: remove logically dead code

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

Quoted 6 lines

Detected by CoverityScan, CID 1397531 Logically dead code

---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 --
 1 file changed, 2 deletions(-)