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>
This commit is contained in:
Wojciech Dubowik 2014-09-18 08:30:41 +02:00 committed by John W. Linville
parent fa5c107cc8
commit 2ba7d144d3

View File

@ -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 */