From: Michal Nazarewicz Date: Fri, 29 Nov 2013 17:06:46 +0000 (+0100) Subject: net: wireless: ath9k: avoid possible NULL pointer dereference X-Git-Tag: v3.13-rc4~3^2~64^2^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beae416b1f40ef3b6f7918035cefcf1d5f9aeb49;p=pandora-kernel.git net: wireless: ath9k: avoid possible NULL pointer dereference 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 Signed-off-by: John W. Linville --- Reading git-diff-tree failed