From: Daniel Wagner Date: Wed, 9 Apr 2008 14:29:01 +0000 (+0200) Subject: rt61pci: rt61pci_beacon_update do not free skb twice X-Git-Tag: v2.6.25-rc9~4^2~5^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e91e9d490d9ae382003ef9d05fd50238db54c35b;p=linux-2.6-omap-h63xx.git rt61pci: rt61pci_beacon_update do not free skb twice The layer above will free the skb in an error case. Signed-off-by: Daniel Wagner Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 93ea212fedd..ad2e7d53b3d 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c @@ -2399,10 +2399,8 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, * beacon frame. */ if (skb_headroom(skb) < TXD_DESC_SIZE) { - if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) { - dev_kfree_skb(skb); + if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) return -ENOMEM; - } } /*