diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-11-06 11:01:20 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-11-26 13:05:17 +0100 |
commit | 3a318426e09a9c9266fe6440842e11238f640a20 (patch) | |
tree | c7486fadb7d18ae46ccc1178b197da3c4452678b /drivers/net | |
parent | brcm80211: Delete an unnecessary check before the function call "release_firm... (diff) | |
download | linux-3a318426e09a9c9266fe6440842e11238f640a20.tar.xz linux-3a318426e09a9c9266fe6440842e11238f640a20.zip |
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: fb9987d0f748 ('ath9k_htc: Support for AR9271 chipset.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_hst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index 2294709ee8b0..fd85f996c554 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -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 |