ath9k: Fix error reported by smatch

debug_sta.c: ath_debug_rate_stats() error: buffer overflow 'rstats->ht_stats' 24 <= 24

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Sujith Manoharan 2014-01-14 09:22:36 +05:30 committed by John W. Linville
parent bb350711ec
commit 1908861f2f
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ void ath_debug_rate_stats(struct ath_softc *sc,
rxs = IEEE80211_SKB_RXCB(skb);
if (IS_HT_RATE(rs->rs_rate)) {
if (rxs->rate_idx > ARRAY_SIZE(rstats->ht_stats))
if (rxs->rate_idx >= ARRAY_SIZE(rstats->ht_stats))
goto exit;
if (rxs->flag & RX_FLAG_40MHZ)