* [patch -next 1/2] ath9k_htc: dereferencing before check in hif_usb_tx_cb()
@ 2010-05-14 14:50 Dan Carpenter
2010-05-18 6:54 ` Sujith
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-14 14:50 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Jouni Malinen, Sujith Manoharan, Vasanthakumar Thiagarajan,
Senthil Balasubramanian, John W. Linville, Ming Lei,
linux-wireless, ath9k-devel
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>
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 46dc41a..ac82911 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,
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch -next 1/2] ath9k_htc: dereferencing before check in hif_usb_tx_cb()
2010-05-14 14:50 [patch -next 1/2] ath9k_htc: dereferencing before check in hif_usb_tx_cb() Dan Carpenter
@ 2010-05-18 6:54 ` Sujith
0 siblings, 0 replies; 2+ messages in thread
From: Sujith @ 2010-05-18 6:54 UTC (permalink / raw)
To: Dan Carpenter
Cc: Luis Rodriguez, Jouni Malinen, Vasanth Thiagarajan,
Senthilkumar Balasubramanian, John W. Linville, Ming Lei,
linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
Dan Carpenter wrote:
> 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>
Thanks.
Acked-by: Sujith <Sujith.Manoharan@atheros.com>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 46dc41a..ac82911 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,
> 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-18 6:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 14:50 [patch -next 1/2] ath9k_htc: dereferencing before check in hif_usb_tx_cb() Dan Carpenter
2010-05-18 6:54 ` Sujith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).