[PATCH 1/2] nvmet-auth: remove unnecessary break after goto

Nitesh Shetty nj.shetty at samsung.com
Thu May 25 23:04:52 PDT 2023


On 23/05/19 02:40AM, Chaitanya Kulkarni wrote:
>Remove dead break after goto.
>
>Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
>---
> drivers/nvme/target/fabrics-cmd-auth.c | 4 ----
> 1 file changed, 4 deletions(-)
>
>diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c
>index 7970a7640e58..6c9a1ce6068d 100644
>--- a/drivers/nvme/target/fabrics-cmd-auth.c
>+++ b/drivers/nvme/target/fabrics-cmd-auth.c
>@@ -295,13 +295,11 @@ void nvmet_execute_auth_send(struct nvmet_req *req)
> 			status = 0;
> 		}
> 		goto done_kfree;
>-		break;
> 	case NVME_AUTH_DHCHAP_MESSAGE_SUCCESS2:
> 		req->sq->authenticated = true;
> 		pr_debug("%s: ctrl %d qid %d ctrl authenticated\n",
> 			 __func__, ctrl->cntlid, req->sq->qid);
> 		goto done_kfree;
>-		break;
> 	case NVME_AUTH_DHCHAP_MESSAGE_FAILURE2:
> 		status = nvmet_auth_failure2(d);
> 		if (status) {
>@@ -312,7 +310,6 @@ void nvmet_execute_auth_send(struct nvmet_req *req)
> 			status = 0;
> 		}
> 		goto done_kfree;
>-		break;
> 	default:
> 		req->sq->dhchap_status =
> 			NVME_AUTH_DHCHAP_FAILURE_INCORRECT_MESSAGE;
>@@ -320,7 +317,6 @@ void nvmet_execute_auth_send(struct nvmet_req *req)
> 			NVME_AUTH_DHCHAP_MESSAGE_FAILURE2;
> 		req->sq->authenticated = false;
> 		goto done_kfree;
>-		break;
> 	}
> done_failure1:
> 	req->sq->dhchap_status = NVME_AUTH_DHCHAP_FAILURE_INCORRECT_MESSAGE;
>-- 
>2.40.0
>
>

Reviewed-by: Nitesh Shetty <nj.shetty at samsung.com>


More information about the Linux-nvme mailing list