aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-02-27 09:17:21 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-27 14:53:26 -0500
commit1cb8b1216c427ddbec51b8c3e77459dd44f85bcc (patch)
tree0fae59f1572351fb39b6e2fe9419e5693402d194
parent4f32e1c4a9bbb30028406c582419d0b4c8aa5af5 (diff)
net/mlx4_en: Combine checks of end-cases in RX completion function
Combine two end-cases in the same if statement with a single return value. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_rx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index b4d144e67514..1e8f21b7fed8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -662,12 +662,9 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
662 int polled = 0; 662 int polled = 0;
663 int index; 663 int index;
664 664
665 if (unlikely(!priv->port_up)) 665 if (unlikely(!priv->port_up || budget <= 0))
666 return 0; 666 return 0;
667 667
668 if (unlikely(budget <= 0))
669 return polled;
670
671 ring = priv->rx_ring[cq_ring]; 668 ring = priv->rx_ring[cq_ring];
672 669
673 /* Protect accesses to: ring->xdp_prog, priv->mac_hash list */ 670 /* Protect accesses to: ring->xdp_prog, priv->mac_hash list */