Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e91e9d49 authored by Daniel Wagner's avatar Daniel Wagner Committed by John W. Linville
Browse files

rt61pci: rt61pci_beacon_update do not free skb twice



The layer above will free the skb in an error case.

Signed-off-by: default avatarDaniel Wagner <wagi@monom.org>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2633da23
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -2399,11 +2399,9 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
	 * beacon frame.
	 * beacon frame.
	 */
	 */
	if (skb_headroom(skb) < TXD_DESC_SIZE) {
	if (skb_headroom(skb) < TXD_DESC_SIZE) {
		if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) {
		if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC))
			dev_kfree_skb(skb);
			return -ENOMEM;
			return -ENOMEM;
	}
	}
	}


	/*
	/*
	 * Add the descriptor in front of the skb.
	 * Add the descriptor in front of the skb.