From 4f8c85196fe4edcdf8e1933daa449b2dbf12f329 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Sun, 8 Dec 2019 22:31:24 -0500 Subject: [PATCH] nvmf: remove the unnecessary goto sentences No funtional code change, removed several unnecessary goto sentences. Change-Id: I4e802246585573be74d185b6bd6b60270d37296c Signed-off-by: Changpeng Liu Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477200 Community-CI: Broadcom SPDK FC-NVMe CI Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- lib/nvmf/ctrlr.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index 5b74e93b2..1bb60b878 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -2330,7 +2330,6 @@ nvmf_ns_reservation_request_check(struct spdk_nvmf_subsystem_pg_ns_info *ns_info if ((rtype == SPDK_NVME_RESERVE_EXCLUSIVE_ACCESS_REG_ONLY || rtype == SPDK_NVME_RESERVE_EXCLUSIVE_ACCESS_ALL_REGS) && !is_registrant) { status = SPDK_NVME_SC_RESERVATION_CONFLICT; - goto exit; } break; case SPDK_NVME_OPC_FLUSH: @@ -2345,7 +2344,6 @@ nvmf_ns_reservation_request_check(struct spdk_nvmf_subsystem_pg_ns_info *ns_info } if (!is_registrant) { status = SPDK_NVME_SC_RESERVATION_CONFLICT; - goto exit; } break; case SPDK_NVME_OPC_RESERVATION_ACQUIRE: @@ -2356,13 +2354,11 @@ nvmf_ns_reservation_request_check(struct spdk_nvmf_subsystem_pg_ns_info *ns_info } if (!is_registrant) { status = SPDK_NVME_SC_RESERVATION_CONFLICT; - goto exit; } break; case SPDK_NVME_OPC_RESERVATION_RELEASE: if (!is_registrant) { status = SPDK_NVME_SC_RESERVATION_CONFLICT; - goto exit; } break; default: