ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()
authorKalle Valo <kvalo@qca.qualcomm.com>
Sun, 10 Mar 2013 05:51:29 +0000 (07:51 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 18 Mar 2013 11:50:19 +0000 (13:50 +0200)
commit99089ab756a26c8f1be5942178bf9b3fa9ae54d6
tree62a524f0dd24f7b0e1d80c4e098cc036c8e280e8
parentaa8705fc65a395d79bdc8bb82a89bcf9abe9f3a4
ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()

Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd()
where we might access sc->supp_rates beyond the end. It shouldn't happen as
ar->wiphy->bands always have just the first two bands set, but add an extra
check just to be sure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/wmi.c