@@ -1241,7 +1241,6 @@ static int crypt_ctr_cipher(struct dm_target *ti,
}
per_cpu_ptr(cc->cpu, cpu)->tfm = tfm;
}
- tfm = any_tfm(cc);
/* Initialize and set key */
ret = crypt_set_key(cc, key);
@@ -1251,7 +1250,7 @@ static int crypt_ctr_cipher(struct dm_target *ti,
}
/* Initialize IV */
- cc->iv_size = crypto_ablkcipher_ivsize(tfm);
+ cc->iv_size = crypto_ablkcipher_ivsize(any_tfm(cc));
if (cc->iv_size)
/* at least a 64 bit sector number should fit in our buffer */
cc->iv_size = max(cc->iv_size,
@@ -1451,10 +1450,7 @@ static int crypt_status(struct dm_target *ti, status_type_t type,
break;
case STATUSTYPE_TABLE:
- if (cc->cipher_mode)
- DMEMIT("%s-%s ", cc->cipher, cc->cipher_mode);
- else
- DMEMIT("%s ", cc->cipher);
+ DMEMIT("%s-%s ", cc->cipher, cc->cipher_mode);
if (cc->key_size > 0) {
if ((maxlen - sz) < ((cc->key_size << 1) + 1))