ath9k/htc_drv_main: off by one error
authorDan Carpenter <error27@gmail.com>
Sat, 8 May 2010 16:24:02 +0000 (18:24 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 May 2010 18:56:47 +0000 (14:56 -0400)
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>
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index e75db06..6c386da 100644 (file)
@@ -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));