Skip to content

Commit

Permalink
ath9k_htc: dereferencing before check in hif_usb_tx_cb()
Browse files Browse the repository at this point in the history
After c11d8f8: "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>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed May 24, 2010
1 parent 663cb47 commit 690e781
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
static void hif_usb_tx_cb(struct urb *urb)
{
struct tx_buf *tx_buf = (struct tx_buf *) urb->context;
struct hif_device_usb *hif_dev = tx_buf->hif_dev;
struct hif_device_usb *hif_dev;
struct sk_buff *skb;

if (!hif_dev || !tx_buf)
if (!tx_buf || !tx_buf->hif_dev)
return;

hif_dev = tx_buf->hif_dev;

switch (urb->status) {
case 0:
break;
Expand Down

0 comments on commit 690e781

Please sign in to comment.