crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / arch / s390 / crypto / crc32-vx.c
index 423ee05887e6dae1588387855494eca11e242162..fafecad2075269735c45a070518e88881e297504 100644 (file)
@@ -111,10 +111,8 @@ static int crc32_vx_setkey(struct crypto_shash *tfm, const u8 *newkey,
 {
        struct crc_ctx *mctx = crypto_shash_ctx(tfm);
 
-       if (newkeylen != sizeof(mctx->key)) {
-               crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (newkeylen != sizeof(mctx->key))
                return -EINVAL;
-       }
        mctx->key = le32_to_cpu(*(__le32 *)newkey);
        return 0;
 }
@@ -124,10 +122,8 @@ static int crc32be_vx_setkey(struct crypto_shash *tfm, const u8 *newkey,
 {
        struct crc_ctx *mctx = crypto_shash_ctx(tfm);
 
-       if (newkeylen != sizeof(mctx->key)) {
-               crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (newkeylen != sizeof(mctx->key))
                return -EINVAL;
-       }
        mctx->key = be32_to_cpu(*(__be32 *)newkey);
        return 0;
 }