aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hif_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hif_usb.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 46dc41a16fa..77b359162d6 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -107,12 +107,14 @@ static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
107static void hif_usb_tx_cb(struct urb *urb) 107static void hif_usb_tx_cb(struct urb *urb)
108{ 108{
109 struct tx_buf *tx_buf = (struct tx_buf *) urb->context; 109 struct tx_buf *tx_buf = (struct tx_buf *) urb->context;
110 struct hif_device_usb *hif_dev = tx_buf->hif_dev; 110 struct hif_device_usb *hif_dev;
111 struct sk_buff *skb; 111 struct sk_buff *skb;
112 112
113 if (!hif_dev || !tx_buf) 113 if (!tx_buf || !tx_buf->hif_dev)
114 return; 114 return;
115 115
116 hif_dev = tx_buf->hif_dev;
117
116 switch (urb->status) { 118 switch (urb->status) {
117 case 0: 119 case 0:
118 break; 120 break;
@@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)
607 609
608 return 0; 610 return 0;
609err: 611err:
612 if (tx_buf) {
613 kfree(tx_buf->buf);
614 kfree(tx_buf);
615 }
610 ath9k_hif_usb_dealloc_tx_urbs(hif_dev); 616 ath9k_hif_usb_dealloc_tx_urbs(hif_dev);
611 return -ENOMEM; 617 return -ENOMEM;
612} 618}