mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
commit33fa46d7b3upstream. In case caam_jr_alloc() fails, ctx->dev carries the error code, thus accessing it with dev_err() is incorrect. Fixes:8c419778ab("crypto: caam - add support for RSA algorithm") Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
75964d0f19
commit
69fbc505c8
@@ -506,7 +506,7 @@ static int caam_rsa_init_tfm(struct crypto_akcipher *tfm)
|
||||
ctx->dev = caam_jr_alloc();
|
||||
|
||||
if (IS_ERR(ctx->dev)) {
|
||||
dev_err(ctx->dev, "Job Ring Device allocation for transform failed\n");
|
||||
pr_err("Job Ring Device allocation for transform failed\n");
|
||||
return PTR_ERR(ctx->dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user