mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
crypto: spacc - Check for allocation failure in spacc_skcipher_fallback()
Check for crypto_alloc_skcipher() failure.
Fixes: c8981d9230 ("crypto: spacc - Add SPAcc Skcipher support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
8bc1bfa02e
commit
3b1c9df662
@@ -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) +
|
||||
|
||||
Reference in New Issue
Block a user