Commit 3b1c9df6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu

crypto: spacc - Check for allocation failure in spacc_skcipher_fallback()

Check for crypto_alloc_skcipher() failure.

Fixes: c8981d92 ("crypto: spacc - Add SPAcc Skcipher support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8bc1bfa0
......@@ -67,6 +67,8 @@ static int spacc_skcipher_fallback(unsigned char *name,
tctx->fb.cipher = crypto_alloc_skcipher(name,
CRYPTO_ALG_TYPE_SKCIPHER,
CRYPTO_ALG_NEED_FALLBACK);
if (IS_ERR(tctx->fb.cipher))
return PTR_ERR(tctx->fb.cipher);
crypto_skcipher_set_reqsize(reqtfm,
sizeof(struct spacc_crypto_reqctx) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment