]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drivers/net/wireless/p54/txrx.c Fix off by one error
authorDarren Jenkins <darrenrjenkins@gmail.com>
Wed, 17 Feb 2010 12:40:15 +0000 (23:40 +1100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Feb 2010 20:52:40 +0000 (15:52 -0500)
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>
drivers/net/wireless/p54/txrx.c

index 0e8f69461ffefdbb5ba4315d02f25167c0ae5012..66057999a93ce03f8a917280eb0857c49d00ae0b 100644 (file)
@@ -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];