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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 21:57:11 +0000 (14:57 -0700)
commit 088ea189c4c75cdf211146faa4b341a0f7476be6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/p54/txrx.c

index b6dda2b27fb526cda78fe1f07d59808c8a84bbbf..9d147ded8741556e81124497c196d480c8b17dc5 100644 (file)
@@ -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];