Skip to content

Commit

Permalink
ath9k: Fix NULL pointer dereference on early irq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wojciech Dubowik authored and John W. Linville committed Sep 22, 2014
1 parent fa5c107 commit 2ba7d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2ba7d14

Please sign in to comment.