From: Dan Carpenter Date: Tue, 5 Dec 2017 14:35:08 +0000 (+0300) Subject: ath9k_htc: Add a sanity check in ath9k_htc_ampdu_action() X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d3ecc8aa8eb3dc677d5214464a0b01e7b5e1d26;p=pandora-kernel.git ath9k_htc: Add a sanity check in ath9k_htc_ampdu_action() commit 413fd2f5c0233d3cde391679b967c1f14cd2cb27 upstream. Smatch generates a warning here: drivers/net/wireless/ath/ath9k/htc_drv_main.c:1688 ath9k_htc_ampdu_action() error: buffer overflow 'ista->tid_state' 8 <= 15 I don't know if it's a real bug or not but the other paths through this function all ensure that "tid" is less than ATH9K_HTC_MAX_TID (8) so checking here makes things more consistent. Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed