summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2008-04-09 16:29:01 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-04-09 21:02:23 +0200
commite91e9d490d9ae382003ef9d05fd50238db54c35b (patch)
tree58c65e544736cad3bd059016d6f112635bae2443 /drivers/net/wireless
parentssb-mipscore: Fix interrupt vectors (diff)
downloadlinux-e91e9d490d9ae382003ef9d05fd50238db54c35b.tar.xz
linux-e91e9d490d9ae382003ef9d05fd50238db54c35b.zip
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 <wagi@monom.org> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 93ea212fedd5..ad2e7d53b3da 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;
- }
}
/*