IB/mlx5: Return appropriate error code instead of ENOMEM

[ Upstream commit d286ac1d05210695c312b9018b3aa7c2048e9aca ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Parav Pandit 2021-01-27 17:00:07 +02:00 committed by Greg Kroah-Hartman
parent 379b5ee283
commit 180cd50dd9
1 changed files with 1 additions and 2 deletions

View File

@ -6213,8 +6213,7 @@ static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev)
err_mp:
mlx5_ib_cleanup_multiport_master(dev);
return -ENOMEM;
return err;
}
static int mlx5_ib_stage_flow_db_init(struct mlx5_ib_dev *dev)