diff mbox

[v2] mlx4_core: Cleanup bug in __mlx4_init_one()

Message ID 20091210113728.GC18037@mtls03 (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Eli Cohen Dec. 10, 2009, 11:37 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 291a505..3cf56d9 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -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);