diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-14 10:50:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-24 15:07:42 -0400 |
commit | 690e781c5a3241d2366a3120ca410162da9c365e (patch) | |
tree | bcdccde29f6df9d636c9e77360b250c255a363a6 /drivers/net/wireless | |
parent | 663cb47cc2c5acd32850f67d051e47d62ed199c9 (diff) |
ath9k_htc: dereferencing before check in hif_usb_tx_cb()
After c11d8f89d3b7: "ath9k_htc: Simplify TX URB management" we no longer
assume that tx_buf is a non-null pointer.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 46dc41a16faa..ac82911ee609 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, | |||
107 | static void hif_usb_tx_cb(struct urb *urb) | 107 | static 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; |