summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojciech Dubowik <Wojciech.Dubowik@neratec.com>2014-09-18 02:30:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-22 16:02:15 -0400
commit2ba7d144d39a596cf5d09390ee7de21cfb69cf2b (patch)
tree34a085aed12e1dd542cd74e7327c36c6dfb02fc0
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>
-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)
513 * touch anything. Note this can happen early 513 * touch anything. Note this can happen early
514 * on if the IRQ is shared. 514 * on if the IRQ is shared.
515 */ 515 */
516 if (test_bit(ATH_OP_INVALID, &common->op_flags)) 516 if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
517 return IRQ_NONE; 517 return IRQ_NONE;
518 518
519 /* shared irq, not for us */ 519 /* shared irq, not for us */