提交 0144bd86 编写于 作者: P Parav Pandit 提交者: Zheng Zengkai

IB/mlx5: Return appropriate error code instead of ENOMEM

stable inclusion
from stable-5.10.20
commit 0d19c3e61668d2166a215583004eb83ff8fcfa2b
bugzilla: 50608

--------------------------------

[ Upstream commit d286ac1d ]

When mlx5_ib_stage_init_init() fails, return the error code related to
failure instead of -ENOMEM.

Fixes: 16c1975f ("IB/mlx5: Create profile infrastructure to add and remove stages")
Link: https://lore.kernel.org/r/20210127150010.1876121-8-leon@kernel.orgSigned-off-by: NParav Pandit <parav@nvidia.com>
Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0bf2ff5e
......@@ -3989,8 +3989,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_enable_driver(struct ib_device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册