net: wireless: ath9k: avoid possible NULL pointer dereference
authorMichal Nazarewicz <mina86@mina86.com>
Fri, 29 Nov 2013 17:06:46 +0000 (18:06 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 2 Dec 2013 18:11:51 +0000 (13:11 -0500)
Code in ath9k_hw_set_clockrate function indicates that ah->curchan
(and thus chan local variable) may be NULL.  If that is indeed the
case, IS_CHAN_HT40(chan) check has to be performed only in branch
where chan is not NULL.  Moving the code under already existing
if condition fixes this issue.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

No differences found