crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / crypto / authencesn.c
index adb7554fca297ef5df5a55abb241d76d948e4e06..749527e1b617540260b8e67be4975d8cbc327d22 100644 (file)
@@ -65,7 +65,7 @@ static int crypto_authenc_esn_setkey(struct crypto_aead *authenc_esn, const u8 *
        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_esn) &
@@ -87,10 +87,6 @@ static int crypto_authenc_esn_setkey(struct crypto_aead *authenc_esn, const u8 *
 out:
        memzero_explicit(&keys, sizeof(keys));
        return err;
-
-badkey:
-       crypto_aead_set_flags(authenc_esn, CRYPTO_TFM_RES_BAD_KEY_LEN);
-       goto out;
 }
 
 static int crypto_authenc_esn_genicv_tail(struct aead_request *req,