crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 3 Apr 2017 15:30:07 +0000 (18:30 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 5 Apr 2017 13:20:16 +0000 (21:20 +0800)
commit33fa46d7b310e06d2cb2ab5417c100af120bfb65
treee66e6bfb110f6046abdfd283b71ba4027f17a7ac
parentec360607a25fae97c81eef2f02268ae8ed3649b4
crypto: caam - fix invalid dereference in caam_rsa_init_tfm()

In case caam_jr_alloc() fails, ctx->dev carries the error code,
thus accessing it with dev_err() is incorrect.

Cc: <stable@vger.kernel.org> # 4.8+
Fixes: 8c419778ab57e ("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>
drivers/crypto/caam/caampkc.c