From: Adrian Bunk Date: Thu, 27 Apr 2006 09:33:42 +0000 (-0700) Subject: [PATCH] ieee80211_wx.c: remove dead code X-Git-Tag: firefly_0821_release~35492^2~23^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6274115ce9f0c87068761b2ba5b0b2f7d13c17cf;p=firefly-linux-kernel-4.4.55.git [PATCH] ieee80211_wx.c: remove dead code Since sec->key_sizes[] is an u8, len can't be < 0. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk Cc: "John W. Linville" Signed-off-by: Andrew Morton Signed-off-by: John W. Linville --- diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index 0ea55cb5f172..a78c4f845f66 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c @@ -503,7 +503,7 @@ int ieee80211_wx_get_encode(struct ieee80211_device *ieee, len = sec->key_sizes[key]; memcpy(keybuf, sec->keys[key], len); - erq->length = (len >= 0 ? len : 0); + erq->length = len; erq->flags |= IW_ENCODE_ENABLED; if (ieee->open_wep)