nvmet-auth: return the error code to the nvmet_auth_host_hash() callers
authorMaurizio Lombardi <mlombard@redhat.com>
Wed, 10 Apr 2024 09:48:41 +0000 (11:48 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 1 May 2024 09:58:42 +0000 (02:58 -0700)
If the nvmet_auth_host_hash() function fails, the error code should
be returned to its callers.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/auth.c

index 3ddbc3880cac8d327074fe8f923b9f257979c8bd..9e51c064b0728792dbd2328ce49a65972ef759d9 100644 (file)
@@ -370,7 +370,7 @@ out_free_response:
        nvme_auth_free_key(transformed_key);
 out_free_tfm:
        crypto_free_shash(shash_tfm);
-       return 0;
+       return ret;
 }
 
 int nvmet_auth_ctrl_hash(struct nvmet_req *req, u8 *response,