]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: check return value of ieee80211_get_tx_rate
authorJohn W. Linville <linville@tuxdriver.com>
Tue, 24 Aug 2010 19:27:34 +0000 (15:27 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 30 Aug 2010 20:01:14 +0000 (16:01 -0400)
commit5cad7fa394b5d3825b63d97a2f9a49d84d9bc57d
tree58b7978cc71089edcd15e47c92e3597288d9f19c
parent7658787e5a9af0128005d022216607c2d3ebc84c
ath5k: check return value of ieee80211_get_tx_rate

This avoids a NULL pointer dereference as reported here:

https://bugzilla.redhat.com/show_bug.cgi?id=625889

When the WARN condition is hit in ieee80211_get_tx_rate, it will return
NULL.  So, we need to check the return value and avoid dereferencing it
in that case.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
Acked-by: Bob Copeland <me@bobcopeland.com>
drivers/net/wireless/ath/ath5k/base.c