Skip to content
Commit 84ac94be authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Greg Kroah-Hartman
Browse files

nvmet: remove unnecessary ctrl parameter

[ Upstream commit de587804

 ]

The function nvmet_ctrl_find_get() accepts out pointer to nvmet_ctrl
structure. This function returns the same error value from two places
that is :- NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR.

Move this to the caller so we can change the return type to nvmet_ctrl.

Now that we can changed the return type, instead of taking out pointer
to the nvmet_ctrl structure remove that function parameter and return
the valid nvmet_ctrl pointer on success and NULL on failure.

Also, add and rename the goto labels for more readability with comments.

Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Stable-dep-of: 1c22e029

 ("nvmet: nul-terminate the NQNs passed in the connect command")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 07009245
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment