mac80211: remove superfluous NULL check
authorJohannes Berg <johannes.berg@intel.com>
Sat, 15 Dec 2018 09:03:09 +0000 (11:03 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Dec 2018 12:17:50 +0000 (13:17 +0100)
At the place where this code lives now, the skb can never be
NULL, so we can remove the pointless NULL check.

It seems to exist because this code was moved around a few times
and originally came from a place where it could in fact be NULL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c

index 582b3d49f89177000aa5850e7f7d970563698eab..4919881c6a862c673f41569eefb193c8a5772a88 100644 (file)
@@ -3583,7 +3583,7 @@ begin:
                        skb_queue_splice_tail(&tx.skbs, &txqi->frags);
        }
 
-       if (skb && skb_has_frag_list(skb) &&
+       if (skb_has_frag_list(skb) &&
            !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
                if (skb_linearize(skb)) {
                        ieee80211_free_txskb(&local->hw, skb);