diff options
author | Wojciech Dubowik <Wojciech.Dubowik@neratec.com> | 2014-09-18 08:30:41 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-09-22 22:02:15 +0200 |
commit | 2ba7d144d39a596cf5d09390ee7de21cfb69cf2b (patch) | |
tree | 34a085aed12e1dd542cd74e7327c36c6dfb02fc0 | |
parent | net: rfkill: gpio: Fix clock status (diff) | |
download | linux-2ba7d144d39a596cf5d09390ee7de21cfb69cf2b.tar.xz linux-2ba7d144d39a596cf5d09390ee7de21cfb69cf2b.zip |
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.c | 2 |
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 */ |