]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
be2net: signedness bug in be_msix_enable()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 29 Jun 2016 14:39:43 +0000 (17:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jun 2016 12:54:18 +0000 (08:54 -0400)
"num_vec" needs to be signed for the error handling to work.

Fixes: e261768e9e39 ('be2net: support asymmetric rx/tx queue counts')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c

index 1873c74638cd0d284688e65522be51e097a84a8e..1f16e73f6d0cce89e33f035ce01367317bd653ab 100644 (file)
@@ -3251,8 +3251,9 @@ static void be_msix_disable(struct be_adapter *adapter)
 
 static int be_msix_enable(struct be_adapter *adapter)
 {
-       unsigned int i, num_vec, max_roce_eqs;
+       unsigned int i, max_roce_eqs;
        struct device *dev = &adapter->pdev->dev;
+       int num_vec;
 
        /* If RoCE is supported, program the max number of vectors that
         * could be used for NIC and RoCE, else, just program the number