summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/fabrics-cmd.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-02-25 02:56:38 +0100
committerChristoph Hellwig <hch@lst.de>2021-04-02 18:48:25 +0200
commita56f14c26df8127815e35ae0272296aaa917a22e (patch)
tree9405d78b7a06de2f5aa6a4f426623d27f8bcee74 /drivers/nvme/target/fabrics-cmd.c
parentnvmet: remove a duplicate status assignment in nvmet_alloc_ctrl (diff)
downloadlinux-a56f14c26df8127815e35ae0272296aaa917a22e.tar.xz
linux-a56f14c26df8127815e35ae0272296aaa917a22e.zip
nvmet: update error log page in nvmet_alloc_ctrl()
Instead of updating the error log page in the caller of the nvmet_alloc_ctrt() update the error log page in the nvmet_alloc_ctrl(). Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/fabrics-cmd.c')
-rw-r--r--drivers/nvme/target/fabrics-cmd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 42bd12b8bf00..d2289aa26645 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -190,12 +190,8 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
status = nvmet_alloc_ctrl(d->subsysnqn, d->hostnqn, req,
le32_to_cpu(c->kato), &ctrl);
- if (status) {
- if (status == (NVME_SC_INVALID_FIELD | NVME_SC_DNR))
- req->error_loc =
- offsetof(struct nvme_common_command, opcode);
+ if (status)
goto out;
- }
ctrl->pi_support = ctrl->port->pi_enable && ctrl->subsys->pi_support;