IB/mlx5: Return appropriate error code instead of ENOMEM
authorParav Pandit <parav@nvidia.com>
Wed, 27 Jan 2021 15:00:07 +0000 (17:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:03 +0000 (11:38 +0100)
commit0d19c3e61668d2166a215583004eb83ff8fcfa2b
tree7484576dfb003148c45785c9e72992d589541e4a
parent377a9c9191637ddc61364cda69f1768825970857
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: 16c1975f1032 ("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>
drivers/infiniband/hw/mlx5/main.c