[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210608143854.4154005-1-weiyongjun1@huawei.com>
Date: Tue, 8 Jun 2021 14:38:54 +0000
From: Wei Yongjun <weiyongjun1@...wei.com>
To: <weiyongjun1@...wei.com>, Arie Gershberg <agershberg@...vell.com>,
Shai Malin <smalin@...vell.com>,
Ariel Elior <aelior@...vell.com>,
Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>
CC: <linux-nvme@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH -next] nvme-tcp-offload: Fix error return code in nvme_tcp_ofld_setup_ctrl()
Fix to return negative error code -EINVAL if mandatory sgls
are not supported.
Fixes: 5aadd5f9311e ("nvme-tcp-offload: Add controller level implementation")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/nvme/host/tcp-offload.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/tcp-offload.c b/drivers/nvme/host/tcp-offload.c
index c76822e5ada7..3879d5ed7497 100644
--- a/drivers/nvme/host/tcp-offload.c
+++ b/drivers/nvme/host/tcp-offload.c
@@ -622,6 +622,7 @@ static int nvme_tcp_ofld_setup_ctrl(struct nvme_ctrl *nctrl, bool new)
if (!(nctrl->sgls & ((1 << 0) | (1 << 1)))) {
dev_err(nctrl->device, "Mandatory sgls are not supported!\n");
+ rc = -EINVAL;
goto destroy_admin;
}
Powered by blists - more mailing lists