Skip to content

Commit

Permalink
be2net: signedness bug in be_msix_enable()
Browse files Browse the repository at this point in the history
"num_vec" needs to be signed for the error handling to work.

Fixes: e261768 ('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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 30, 2016
1 parent 9b9a553 commit 6fde0e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fde0e6

Please sign in to comment.