From: Dan Carpenter Date: Fri, 4 Dec 2015 13:15:23 +0000 (+0300) Subject: cw1200: remove some dead code X-Git-Tag: v4.5-rc1~128^2~63^2~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09ad44efe722161bbc26317b6c2a43dfd86f023b;p=thirdparty%2Fkernel%2Flinux.git 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. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c index 95a7fdb3cc1cd..06321c799c902 100644 --- a/drivers/net/wireless/st/cw1200/sta.c +++ b/drivers/net/wireless/st/cw1200/sta.c @@ -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;