block/mq-deadline: Move dd_queued() to fix defined but not used warning
[linux-2.6-microblaze.git] / block / blk-crypto.c
index c5bdaaf..103c2e2 100644 (file)
@@ -332,7 +332,7 @@ int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key,
        if (mode->keysize == 0)
                return -EINVAL;
 
-       if (dun_bytes == 0 || dun_bytes > BLK_CRYPTO_MAX_IV_SIZE)
+       if (dun_bytes == 0 || dun_bytes > mode->ivsize)
                return -EINVAL;
 
        if (!is_power_of_2(data_unit_size))