Skip to contentSkip to conversation

staging: silicom: remove dead code

PATCH New Michal Nazarewicz 1 participant 1 message Nov 29, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: silicom: remove dead code

From: Michal Nazarewicz <[email protected]>

bus_info field of struct ethtool_drvinfo is an array thus it always evaluates to true in a boolean context. Therefore operation depending on it being false will never be executed.

---
 drivers/staging/silicom/bpctl_mod.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/silicom/bpctl_mod.c +0 -2
index 39dc92a..20325f5 100644
@@ -135,8 +135,6 @@ static int bp_get_dev_idx_bsf(struct net_device *dev, int *index)
 	else
 		return -EOPNOTSUPP;
 
-	if (!drvinfo.bus_info)
-		return -ENODATA;
 	if (!strcmp(drvinfo.bus_info, "N/A"))
 		return -ENODATA;
 
Signature · 1 line
1.8.4.1