]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/crypto/cavium/nitrox/nitrox_aead.c
crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[mirror_ubuntu-jammy-kernel.git] / drivers / crypto / cavium / nitrox / nitrox_aead.c
index 6f80cc3b5c84b3726758de786ced9b2446dea2e3..dce5423a58831382b4c039b1f924bd95b20358ab 100644 (file)
@@ -40,10 +40,8 @@ static int nitrox_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key,
        union fc_ctx_flags flags;
 
        aes_keylen = flexi_aes_keylen(keylen);
-       if (aes_keylen < 0) {
-               crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (aes_keylen < 0)
                return -EINVAL;
-       }
 
        /* fill crypto context */
        fctx = nctx->u.fctx;