]> git.karo-electronics.de Git - karo-tx-linux.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:48 +0000 (18:07 -0500)
commit4bc2b2fce7a6de8df10442c73600327b6b999706
tree7a802691e60d4830f418e8ef991d0f70f184e9cc
parent4cd69d4ef59656cc77f70284ec22ecc60c39b0c3
ath5k: check return value of ieee80211_get_tx_rate

commit d8e1ba76d619dbc0be8fbeee4e6c683b5c812d3a upstream.

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>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/wireless/ath/ath5k/base.c