From: Chaitanya Kulkarni Date: Thu, 25 Feb 2021 01:56:37 +0000 (-0800) Subject: nvmet: remove a duplicate status assignment in nvmet_alloc_ctrl X-Git-Tag: v5.15~1258^2~65^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76affbe6d608490c6c762428b6a0748c9b797a1e;p=platform%2Fkernel%2Flinux-starfive.git nvmet: remove a duplicate status assignment in nvmet_alloc_ctrl In the function nvmet_alloc_ctrl() we assign status value before we call nvmet_fine_get_subsys() to: status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR; After we successfully find the subsystem we again set the status value to: status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR; Remove the duplicate status assignment value. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index be6fcda..e3b8ec5 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -1314,7 +1314,6 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, goto out; } - status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR; down_read(&nvmet_config_sem); if (!nvmet_host_allowed(subsys, hostnqn)) { pr_info("connect by host %s for subsystem %s not allowed\n",