From: Adrian Bunk Date: Thu, 27 Apr 2006 09:33:42 +0000 (-0700) Subject: [PATCH] ieee80211_wx.c: remove dead code X-Git-Tag: v2.6.18-rc1~1115^2~60^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6274115ce9f0c87068761b2ba5b0b2f7d13c17cf;p=linux-2.6 [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 0ea55cb5f1..a78c4f845f 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)