Skip to content

Commit

Permalink
drivers/net/wireless/p54/txrx.c Fix off by one error
Browse files Browse the repository at this point in the history
fix off by one error in the queue size check of p54_tx_qos_accounting_alloc()

Coverity CID: 13314

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Darren Jenkins authored and John W. Linville committed Feb 19, 2010
1 parent fbc87d6 commit 088ea18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/p54/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int p54_tx_qos_accounting_alloc(struct p54_common *priv,
struct p54_tx_queue_stats *queue;
unsigned long flags;

if (WARN_ON(p54_queue > P54_QUEUE_NUM))
if (WARN_ON(p54_queue >= P54_QUEUE_NUM))
return -EINVAL;

queue = &priv->tx_stats[p54_queue];
Expand Down

0 comments on commit 088ea18

Please sign in to comment.