crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / crypto / authenc.c
index 3f0ed9402582026dab4d96e99b40a42fef0020c7..0da80632e8721240f161e2fbfd26b89ec712d438 100644 (file)
@@ -91,7 +91,7 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
        int err = -EINVAL;
 
        if (crypto_authenc_extractkeys(&keys, key, keylen) != 0)
-               goto badkey;
+               goto out;
 
        crypto_ahash_clear_flags(auth, CRYPTO_TFM_REQ_MASK);
        crypto_ahash_set_flags(auth, crypto_aead_get_flags(authenc) &
@@ -113,10 +113,6 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
 out:
        memzero_explicit(&keys, sizeof(keys));
        return err;
-
-badkey:
-       crypto_aead_set_flags(authenc, CRYPTO_TFM_RES_BAD_KEY_LEN);
-       goto out;
 }
 
 static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err)