summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2022-11-13 12:24:12 +0100
committerChristoph Hellwig <hch@lst.de>2022-11-16 08:36:35 +0100
commitbfc4068e1e55e30a86f0e82e15163a60f99a894d (patch)
tree2cb7349e1dcf8637c01b26d290802a6f4a55a900 /drivers/nvme
parentnvme-auth: don't override ctrl keys before validation (diff)
downloadlinux-bfc4068e1e55e30a86f0e82e15163a60f99a894d.tar.xz
linux-bfc4068e1e55e30a86f0e82e15163a60f99a894d.zip
nvme-auth: remove redundant if statement
No one passes NVME_QID_ANY to nvme_auth_negotiate. Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index d62862ef5b3f..e7e4a00ee37e 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -874,7 +874,7 @@ int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
mutex_unlock(&ctrl->dhchap_auth_mutex);
return -ENOMEM;
}
- chap->qid = (qid == NVME_QID_ANY) ? 0 : qid;
+ chap->qid = qid;
chap->ctrl = ctrl;
/*