Skip to contentSkip to conversation

cw1200: remove some dead code

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 4, 2015 – Dec 11, 2015

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

PATCH 1/1 cw1200: remove some dead code

If the mode is NL80211_IFTYPE_UNSPECIFIED then we return success at the start of the function so this condition is never true.

drivers/net/wireless/st/cw1200/sta.c +0 -6
index 95a7fdb..06321c7 100644
@@ -873,12 +873,6 @@ int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 	else
 		val32 = 0; /* disabled */
 
-	if (priv->mode = NL80211_IFTYPE_UNSPECIFIED) {
-		/* device is down, can _not_ set threshold */
-		ret = -ENODEV;
-		goto out;
-	}
-
 	if (priv->rts_threshold = value)
 		goto out;
 
Applied
#1 lore raw
Quoted 5 lines

If the mode is NL80211_IFTYPE_UNSPECIFIED then we return success at the start of the function so this condition is never true.

Thanks, applied to wireless-drivers-next.git.

Kalle Valo