mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
nvme-rdma: fix error code in nvme_rdma_setup_ctrl
[ Upstream commit0974812200
] In case that icdoff is not zero or mandatory keyed sgls are not supported by the NVMe/RDMA target, we'll go to error flow but we'll return 0 to the caller. Fix it by returning an appropriate error code. Fixes:c66e2998c8
("nvme-rdma: centralize controller setup sequence") Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b2cf0bed68
commit
ff950ae832
1 changed files with 2 additions and 0 deletions
|
@ -1095,11 +1095,13 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
|
|||
return ret;
|
||||
|
||||
if (ctrl->ctrl.icdoff) {
|
||||
ret = -EOPNOTSUPP;
|
||||
dev_err(ctrl->ctrl.device, "icdoff is not supported!\n");
|
||||
goto destroy_admin;
|
||||
}
|
||||
|
||||
if (!(ctrl->ctrl.sgls & (1 << 2))) {
|
||||
ret = -EOPNOTSUPP;
|
||||
dev_err(ctrl->ctrl.device,
|
||||
"Mandatory keyed sgls are not supported!\n");
|
||||
goto destroy_admin;
|
||||
|
|
Loading…
Reference in a new issue