crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / drivers / crypto / allwinner / sun8i-ss / sun8i-ss-cipher.c
index f222979a562329041c3b3b3a6d5f19152c1f41bd..84d52fc3a2da6e9175908c17e9b0431938a271d5 100644 (file)
@@ -390,7 +390,6 @@ int sun8i_ss_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
                break;
        default:
                dev_dbg(ss->dev, "ERROR: Invalid keylen %u\n", keylen);
-               crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
                return -EINVAL;
        }
        if (op->key) {
@@ -416,7 +415,6 @@ int sun8i_ss_des3_setkey(struct crypto_skcipher *tfm, const u8 *key,
 
        if (unlikely(keylen != 3 * DES_KEY_SIZE)) {
                dev_dbg(ss->dev, "Invalid keylen %u\n", keylen);
-               crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
                return -EINVAL;
        }