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

Commit b4f77264 authored by Eli Cohen's avatar Eli Cohen Committed by Roland Dreier
Browse files

mlx4_core: Fix cleanup in __mlx4_init_one() error path



If mlx4_init_port_info() fails, cleanup the initialized ports only.

Signed-off-by: default avatarEli Cohen <eli@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 2b946077
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1174,7 +1174,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
	return 0;

err_port:
	for (port = 1; port <= dev->caps.num_ports; port++)
	for (--port; port >= 1; --port)
		mlx4_cleanup_port_info(&priv->port[port]);

	mlx4_cleanup_mcg_table(dev);