summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-06-29 17:39:43 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-30 08:54:18 -0400
commit6fde0e63eccbaf21fa278b240b8129fec14b864b (patch)
treed444a186050d51a30865cf9b6af5b370e06d0232 /drivers/net/ethernet/emulex
parent9b9a553c902e79867b6527301fe64e45be23e36b (diff)
be2net: signedness bug in be_msix_enable()
"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>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 1873c74638cd..1f16e73f6d0c 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -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