Skip to content

Commit 1cb8b12

Browse files
Tariq Toukandavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4f32e1c commit 1cb8b12

File tree

1 file changed

+1
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+1
-4
lines changed

drivers/net/ethernet/mellanox/mlx4/en_rx.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,12 +662,9 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
662662
int polled = 0;
663663
int index;
664664

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

668-
if (unlikely(budget <= 0))
669-
return polled;
670-
671668
ring = priv->rx_ring[cq_ring];
672669

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

0 commit comments

Comments
 (0)