1
0
Fork 0

ath9k_htc: check for underflow in ath9k_htc_rx_msg()

We check for overflow here, but we don't check for underflow so it
causes a static checker warning.

Fixes: fb9987d0f7 ('ath9k_htc: Support for AR9271 chipset.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
hifive-unleashed-5.1
Dan Carpenter 2015-11-06 13:01:20 +03:00 committed by Kalle Valo
parent 21ba005464
commit 3a318426e0
1 changed files with 1 additions and 1 deletions

View File

@ -414,7 +414,7 @@ void ath9k_htc_rx_msg(struct htc_target *htc_handle,
return;
}
if (epid >= ENDPOINT_MAX) {
if (epid < 0 || epid >= ENDPOINT_MAX) {
if (pipe_id != USB_REG_IN_PIPE)
dev_kfree_skb_any(skb);
else