summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-08 16:24:02 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2010-05-10 18:56:47 (GMT)
commit0730d114194364d078dbd0cfce708e8c67dccdfb (patch)
tree5f822d3e6970f3fb999ccd10dccf61d46354e974
parent277a64d17ee819161242ce3059a9c2d0f8dfd29c (diff)
downloadlinux-fsl-qoriq-0730d114194364d078dbd0cfce708e8c67dccdfb.tar.xz
ath9k/htc_drv_main: off by one error
I changed "> ATH9K_HTC_MAX_TID" to ">= ATH9K_HTC_MAX_TID" to avoid a potential overflow. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index e75db06..6c386da 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -465,7 +465,7 @@ static int ath9k_htc_aggr_oper(struct ath9k_htc_priv *priv,
int ret = 0;
u8 cmd_rsp;
- if (tid > ATH9K_HTC_MAX_TID)
+ if (tid >= ATH9K_HTC_MAX_TID)
return -EINVAL;
memset(&aggr, 0, sizeof(struct ath9k_htc_target_aggr));