[PATCH] crypto: khazad - simplify return statement in khazad_mod_init

Thorsten Blum posted 1 patch 1 month, 3 weeks ago
crypto/khazad.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[PATCH] crypto: khazad - simplify return statement in khazad_mod_init
Posted by Thorsten Blum 1 month, 3 weeks ago
Return the result of calling crypto_register_alg() directly and remove
the local return variable.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 crypto/khazad.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/crypto/khazad.c b/crypto/khazad.c
index 024264ee9cd1..dee54ad5f0e4 100644
--- a/crypto/khazad.c
+++ b/crypto/khazad.c
@@ -859,10 +859,7 @@ static struct crypto_alg khazad_alg = {
 
 static int __init khazad_mod_init(void)
 {
-	int ret = 0;
-	
-	ret = crypto_register_alg(&khazad_alg);
-	return ret;
+	return crypto_register_alg(&khazad_alg);
 }
 
 static void __exit khazad_mod_fini(void)
-- 
Thorsten Blum <thorsten.blum@linux.dev>
GPG: 1D60 735E 8AEF 3BE4 73B6  9D84 7336 78FD 8DFE EAD4
Re: [PATCH] crypto: khazad - simplify return statement in khazad_mod_init
Posted by Herbert Xu 1 month, 1 week ago
On Tue, Dec 16, 2025 at 03:55:35PM +0100, Thorsten Blum wrote:
> Return the result of calling crypto_register_alg() directly and remove
> the local return variable.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  crypto/khazad.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt