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>
This commit is contained in:
parent
277a64d17e
commit
0730d11419
1 changed files with 1 additions and 1 deletions
|
@ -465,7 +465,7 @@ static int ath9k_htc_aggr_oper(struct ath9k_htc_priv *priv,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u8 cmd_rsp;
|
u8 cmd_rsp;
|
||||||
|
|
||||||
if (tid > ATH9K_HTC_MAX_TID)
|
if (tid >= ATH9K_HTC_MAX_TID)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
memset(&aggr, 0, sizeof(struct ath9k_htc_target_aggr));
|
memset(&aggr, 0, sizeof(struct ath9k_htc_target_aggr));
|
||||||
|
|
Loading…
Add table
Reference in a new issue