diff options
| author | Eli Cohen <eli@mellanox.co.il> | 2010-01-06 15:54:39 -0500 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2010-01-06 15:54:39 -0500 |
| commit | b4f77264cd1a858ee09da8dba5a2711a649adbf3 (patch) | |
| tree | b7d0a290ced5c4cb578bb8995d791eb9ba46849f /drivers | |
| parent | 2b946077423270f065013c45d78522a5fb9542ca (diff) | |
mlx4_core: Fix cleanup in __mlx4_init_one() error path
If mlx4_init_port_info() fails, cleanup the initialized ports only.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/mlx4/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 291a505fd4fc..3cf56d90d859 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) | |||
| 1174 | return 0; | 1174 | return 0; |
| 1175 | 1175 | ||
| 1176 | err_port: | 1176 | err_port: |
| 1177 | for (port = 1; port <= dev->caps.num_ports; port++) | 1177 | for (--port; port >= 1; --port) |
| 1178 | mlx4_cleanup_port_info(&priv->port[port]); | 1178 | mlx4_cleanup_port_info(&priv->port[port]); |
| 1179 | 1179 | ||
| 1180 | mlx4_cleanup_mcg_table(dev); | 1180 | mlx4_cleanup_mcg_table(dev); |
