From: Dan Carpenter Date: Sat, 8 May 2010 16:24:02 +0000 (+0200) Subject: ath9k/htc_drv_main: off by one error X-Git-Tag: v2.6.35-rc1~473^2~167^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0730d114194364d078dbd0cfce708e8c67dccdfb;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Acked-by: Sujith Signed-off-by: John W. Linville --- 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));