Skip to content

Commit 2ba7d14

Browse files
Wojciech Dubowiklinvjw
authored andcommitted
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent fa5c107 commit 2ba7d14

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ irqreturn_t ath_isr(int irq, void *dev)
513513
* touch anything. Note this can happen early
514514
* on if the IRQ is shared.
515515
*/
516-
if (test_bit(ATH_OP_INVALID, &common->op_flags))
516+
if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
517517
return IRQ_NONE;
518518

519519
/* shared irq, not for us */

0 commit comments

Comments
 (0)