提交 f6b99b6e 编写于 作者: S Sascha Hauer 提交者: Herbert Xu

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: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 ff455ad9
......@@ -1021,9 +1021,10 @@ static void skcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err,
ivsize, ivsize, 0);
#ifdef DEBUG
print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ",
DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
edesc->src_nents > 1 ? 100 : ivsize, 1);
if (ivsize)
print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ",
DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
edesc->src_nents > 1 ? 100 : ivsize, 1);
#endif
caam_dump_sg(KERN_ERR, "dst @" __stringify(__LINE__)": ",
DUMP_PREFIX_ADDRESS, 16, 4, req->dst,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册