提交 690e781c 编写于 作者: D Dan Carpenter 提交者: John W. Linville

ath9k_htc: dereferencing before check in hif_usb_tx_cb()

After c11d8f89: "ath9k_htc: Simplify TX URB management" we no longer
assume that tx_buf is a non-null pointer.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 663cb47c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册