net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb”
The dev_kfree_skb() function performs also input parameter validation. Thus the test around the shown calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:

committed by
Kalle Valo

parent
52d4261862
commit
868ad21496
@@ -5182,8 +5182,7 @@ il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
memset(&il->current_ht_config, 0, sizeof(struct il_ht_config));
|
||||
|
||||
/* new association get rid of ibss beacon skb */
|
||||
if (il->beacon_skb)
|
||||
dev_kfree_skb(il->beacon_skb);
|
||||
dev_kfree_skb(il->beacon_skb);
|
||||
il->beacon_skb = NULL;
|
||||
il->timestamp = 0;
|
||||
|
||||
@@ -5302,10 +5301,7 @@ il_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&il->lock, flags);
|
||||
|
||||
if (il->beacon_skb)
|
||||
dev_kfree_skb(il->beacon_skb);
|
||||
|
||||
dev_kfree_skb(il->beacon_skb);
|
||||
il->beacon_skb = skb;
|
||||
|
||||
timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
|
||||
|
Reference in New Issue
Block a user