crypto: sa2ul - Return crypto_aead_setkey to transfer the error
authorChen Ni <nichen@iscas.ac.cn>
Mon, 27 Nov 2023 02:03:01 +0000 (02:03 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 1 Dec 2023 10:03:26 +0000 (18:03 +0800)
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 <nichen@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c

index 6846a84295745e75867a91c31abe0ebe9c7d5981..78a4930c648090f1d63f8ba6e7339f6c11c902e5 100644 (file)
@@ -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)