IB/mlx5: Return appropriate error code instead of ENOMEM
When mlx5_ib_stage_init_init() fails, return the error code related to
failure instead of -ENOMEM.
Fixes: 16c1975f10
("IB/mlx5: Create profile infrastructure to add and remove stages")
Link: https://lore.kernel.org/r/20210127150010.1876121-8-leon@kernel.org
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
4629c5d4db
commit
d286ac1d05
@ -3998,8 +3998,7 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)
|
|||||||
|
|
||||||
err_mp:
|
err_mp:
|
||||||
mlx5_ib_cleanup_multiport_master(dev);
|
mlx5_ib_cleanup_multiport_master(dev);
|
||||||
|
return err;
|
||||||
return -ENOMEM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mlx5_ib_enable_driver(struct ib_device *dev)
|
static int mlx5_ib_enable_driver(struct ib_device *dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user