提交 3a318426 编写于 作者: D Dan Carpenter 提交者: Kalle Valo

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: fb9987d0 ('ath9k_htc: Support for AR9271 chipset.')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 21ba0054
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册