summaryrefslogtreecommitdiff
path: root/drivers/nvme/common/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nvme/common/auth.c')
-rw-r--r--drivers/nvme/common/auth.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/nvme/common/auth.c b/drivers/nvme/common/auth.c
index f954aeb647a5..a8e87dfbeab2 100644
--- a/drivers/nvme/common/auth.c
+++ b/drivers/nvme/common/auth.c
@@ -190,14 +190,6 @@ struct nvme_dhchap_key *nvme_auth_extract_key(unsigned char *secret,
goto out_free_secret;
}
- if (key_hash > 0 &&
- (key_len - 4) != nvme_auth_hmac_hash_len(key_hash)) {
- pr_err("Mismatched key len %d for %s\n", key_len,
- nvme_auth_hmac_name(key_hash));
- ret = -EINVAL;
- goto out_free_secret;
- }
-
/* The last four bytes is the CRC in little-endian format */
key_len -= 4;
/*