From: Chen Ni Date: Mon, 27 Nov 2023 02:03:01 +0000 (+0000) Subject: crypto: sa2ul - Return crypto_aead_setkey to transfer the error X-Git-Tag: v6.6.17~1322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b94f7e34d6a2df68f08af3410ac1f1f87944ac96;p=platform%2Fkernel%2Flinux-rpi.git crypto: sa2ul - Return crypto_aead_setkey to transfer the error [ Upstream commit ce852f1308ac738e61c5b2502517deea593a1554 ] Return crypto_aead_setkey() in order to transfer the error if it fails. Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support") Signed-off-by: Chen Ni Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index 6238d34..94eb6f6 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c @@ -1869,9 +1869,8 @@ static int sa_aead_setkey(struct crypto_aead *authenc, crypto_aead_set_flags(ctx->fallback.aead, crypto_aead_get_flags(authenc) & CRYPTO_TFM_REQ_MASK); - crypto_aead_setkey(ctx->fallback.aead, key, keylen); - return 0; + return crypto_aead_setkey(ctx->fallback.aead, key, keylen); } static int sa_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize)