mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
99d8cd03ed
commit
32129af260
+1
-4
@@ -77,10 +77,7 @@ int mt76x02_mac_set_beacon(struct mt76x02_dev *dev, u8 vif_idx,
|
||||
for (i = 0; i < ARRAY_SIZE(dev->beacons); i++) {
|
||||
if (vif_idx == i) {
|
||||
force_update = !!dev->beacons[i] ^ !!skb;
|
||||
|
||||
if (dev->beacons[i])
|
||||
dev_kfree_skb(dev->beacons[i]);
|
||||
|
||||
dev_kfree_skb(dev->beacons[i]);
|
||||
dev->beacons[i] = skb;
|
||||
__mt76x02_mac_set_beacon(dev, bcn_idx, skb);
|
||||
} else if (force_update && dev->beacons[i]) {
|
||||
|
||||
Reference in New Issue
Block a user