From: Achiad Shochat Date: Tue, 23 Jun 2015 14:14:17 +0000 (+0300) Subject: net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9fc5930625bcf7c519db84023ec720e7f2f7f61c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net/mlx5e: Avoid redundant dev_kfree_skb() upon NOP completion NOP completion SKBs are always NULL. Signed-off-by: Achiad Shochat Signed-off-by: Saeed Mahameed Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index c0566b684778..f5c7d78c64f7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -294,7 +294,7 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq) if (unlikely(!skb)) { /* nop */ sq->stats.nop++; sqcc++; - goto free_skb; + continue; } for (j = 0; j < MLX5E_TX_SKB_CB(skb)->num_dma; j++) { @@ -309,8 +309,6 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq) npkts++; nbytes += MLX5E_TX_SKB_CB(skb)->num_bytes; sqcc += MLX5E_TX_SKB_CB(skb)->num_wqebbs; - -free_skb: dev_kfree_skb(skb); }