All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'
@ 2018-05-08  9:34 ` Christophe JAILLET
  0 siblings, 0 replies; 16+ messages in thread
From: Christophe JAILLET @ 2018-05-08  9:34 UTC (permalink / raw)
  To: davem, tariqt
  Cc: netdev, linux-rdma, linux-kernel, kernel-janitors,
	Christophe JAILLET

If the 2nd memory allocation of the loop fails, we must undo the
memory allocation done so far.

Fixes: 67f8b1dcb9ee ("net/mlx4_en: Refactor the XDP forwarding rings scheme")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index e0adac4a9a19..bf078244e467 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -3331,7 +3331,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
 		if (!priv->tx_cq[t]) {
 			kfree(priv->tx_ring[t]);
 			err = -ENOMEM;
-			goto out;
+			goto err_free_tx;
 		}
 	}
 	priv->rx_ring_num = prof->rx_ring_num;
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-05-10 15:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-08  9:34 [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()' Christophe JAILLET
2018-05-08  9:34 ` Christophe JAILLET
2018-05-09 10:31 ` Tariq Toukan
2018-05-09 10:31   ` Tariq Toukan
2018-05-10  7:02 ` Christophe JAILLET
2018-05-10  7:02   ` Christophe JAILLET
2018-05-10 13:38   ` Yuval Shaia
2018-05-10 13:38     ` Yuval Shaia
2018-05-10 14:18     ` Dan Carpenter
2018-05-10 14:18       ` Dan Carpenter
2018-05-10 14:36       ` Tariq Toukan
2018-05-10 14:36         ` Tariq Toukan
2018-05-10 15:03         ` Tariq Toukan
2018-05-10 15:03           ` Tariq Toukan
2018-05-10 14:35     ` Christophe JAILLET
2018-05-10 14:35       ` Christophe JAILLET

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.