nvme-auth: remove redundant if statement
authorSagi Grimberg <sagi@grimberg.me>
Sun, 13 Nov 2022 11:24:12 +0000 (13:24 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 Nov 2022 07:36:35 +0000 (08:36 +0100)
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>
drivers/nvme/host/auth.c

index d62862ef5b3f3b42a627a243c700bd7703fcdc78..e7e4a00ee37ec1182e62d36da25356ab40e9bd49 100644 (file)
@@ -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;
 
        /*