Skip to contentSkip to conversation

drivers/net/wireless/p54/txrx.c Fix off by one error

PATCH New Darren Jenkins 1 participant 1 message Feb 17, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 drivers/net/wireless/p54/txrx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/p54/txrx.c +1 -1
index b6dda2b..9d147de 100644
@@ -186,7 +186,7 @@ static int p54_tx_qos_accounting_alloc(struct p54_common *priv,
 	struct ieee80211_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];
Signature · 1 line
1.6.3.3