summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorWojciech Dubowik <Wojciech.Dubowik@neratec.com>2014-09-18 08:30:41 +0200
committerJohn W. Linville <linville@tuxdriver.com>2014-09-22 16:02:15 -0400
commit2ba7d144d39a596cf5d09390ee7de21cfb69cf2b (patch)
tree34a085aed12e1dd542cd74e7327c36c6dfb02fc0 /drivers/net
parentfa5c107cc887886a04ee2dbce05af86de220ae48 (diff)
ath9k: Fix NULL pointer dereference on early irq
The ah struct might not have been initialized when interrupt comes so check for it. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e6ac8d2e610c..4b148bbb2bf6 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -513,7 +513,7 @@ irqreturn_t ath_isr(int irq, void *dev)
* touch anything. Note this can happen early
* on if the IRQ is shared.
*/
- if (test_bit(ATH_OP_INVALID, &common->op_flags))
+ if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
return IRQ_NONE;
/* shared irq, not for us */