From: Darren Jenkins Date: Wed, 17 Feb 2010 12:40:15 +0000 (+1100) Subject: drivers/net/wireless/p54/txrx.c Fix off by one error X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=088ea189c4c75cdf211146faa4b341a0f7476be6;p=mv-sheeva.git drivers/net/wireless/p54/txrx.c Fix off by one error fix off by one error in the queue size check of p54_tx_qos_accounting_alloc() Coverity CID: 13314 Signed-off-by: Darren Jenkins Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c index 0e8f69461ff..66057999a93 100644 --- a/drivers/net/wireless/p54/txrx.c +++ b/drivers/net/wireless/p54/txrx.c @@ -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];