diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 827b72dfce99..0fadac546b00 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -1234,13 +1234,13 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1234 | mlx4_info(dev, "non-primary physical function, skipping.\n"); | 1234 | mlx4_info(dev, "non-primary physical function, skipping.\n"); |
1235 | else | 1235 | else |
1236 | mlx4_err(dev, "QUERY_FW command failed, aborting.\n"); | 1236 | mlx4_err(dev, "QUERY_FW command failed, aborting.\n"); |
1237 | goto unmap_bf; | 1237 | return err; |
1238 | } | 1238 | } |
1239 | 1239 | ||
1240 | err = mlx4_load_fw(dev); | 1240 | err = mlx4_load_fw(dev); |
1241 | if (err) { | 1241 | if (err) { |
1242 | mlx4_err(dev, "Failed to start FW, aborting.\n"); | 1242 | mlx4_err(dev, "Failed to start FW, aborting.\n"); |
1243 | goto unmap_bf; | 1243 | return err; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | mlx4_cfg.log_pg_sz_m = 1; | 1246 | mlx4_cfg.log_pg_sz_m = 1; |
@@ -1304,7 +1304,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1304 | err = mlx4_init_slave(dev); | 1304 | err = mlx4_init_slave(dev); |
1305 | if (err) { | 1305 | if (err) { |
1306 | mlx4_err(dev, "Failed to initialize slave\n"); | 1306 | mlx4_err(dev, "Failed to initialize slave\n"); |
1307 | goto unmap_bf; | 1307 | return err; |
1308 | } | 1308 | } |
1309 | 1309 | ||
1310 | err = mlx4_slave_cap(dev); | 1310 | err = mlx4_slave_cap(dev); |
@@ -1324,7 +1324,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1324 | err = mlx4_QUERY_ADAPTER(dev, &adapter); | 1324 | err = mlx4_QUERY_ADAPTER(dev, &adapter); |
1325 | if (err) { | 1325 | if (err) { |
1326 | mlx4_err(dev, "QUERY_ADAPTER command failed, aborting.\n"); | 1326 | mlx4_err(dev, "QUERY_ADAPTER command failed, aborting.\n"); |
1327 | goto err_close; | 1327 | goto unmap_bf; |
1328 | } | 1328 | } |
1329 | 1329 | ||
1330 | priv->eq_table.inta_pin = adapter.inta_pin; | 1330 | priv->eq_table.inta_pin = adapter.inta_pin; |
@@ -1332,6 +1332,9 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
1332 | 1332 | ||
1333 | return 0; | 1333 | return 0; |
1334 | 1334 | ||
1335 | unmap_bf: | ||
1336 | unmap_bf_area(dev); | ||
1337 | |||
1335 | err_close: | 1338 | err_close: |
1336 | mlx4_close_hca(dev); | 1339 | mlx4_close_hca(dev); |
1337 | 1340 | ||
@@ -1344,8 +1347,6 @@ err_stop_fw: | |||
1344 | mlx4_UNMAP_FA(dev); | 1347 | mlx4_UNMAP_FA(dev); |
1345 | mlx4_free_icm(dev, priv->fw.fw_icm, 0); | 1348 | mlx4_free_icm(dev, priv->fw.fw_icm, 0); |
1346 | } | 1349 | } |
1347 | unmap_bf: | ||
1348 | unmap_bf_area(dev); | ||
1349 | return err; | 1350 | return err; |
1350 | } | 1351 | } |
1351 | 1352 | ||