Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b99b6e authored by Sascha Hauer's avatar Sascha Hauer Committed by Herbert Xu
Browse files

crypto: caam - print IV only when non NULL



Since eaed71a4 ("crypto: caam - add ecb(*) support") the IV can be
NULL, so only dump it when it's non NULL as designated by the ivsize
variable.

Fixes: eaed71a4 ("crypto: caam - add ecb(*) support")
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ff455ad9
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1021,6 +1021,7 @@ static void skcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err,
					 ivsize, ivsize, 0);

#ifdef DEBUG
	if (ivsize)
		print_hex_dump(KERN_ERR, "dstiv  @"__stringify(__LINE__)": ",
			       DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
			       edesc->src_nents > 1 ? 100 : ivsize, 1);