Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cb8b121 authored by Tariq Toukan's avatar Tariq Toukan Committed by David S. Miller
Browse files

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: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4f32e1c4
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -662,12 +662,9 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
	int polled = 0;
	int index;

	if (unlikely(!priv->port_up))
	if (unlikely(!priv->port_up || budget <= 0))
		return 0;

	if (unlikely(budget <= 0))
		return polled;

	ring = priv->rx_ring[cq_ring];

	/* Protect accesses to: ring->xdp_prog, priv->mac_hash list */