Skip to contentSkip to conversation

crypto: khazad - simplify return statement in khazad_mod_init

PATCH In review Thorsten Blum 2 participants 2 messages Dec 16, 2025 – Dec 29, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: khazad - simplify return statement in khazad_mod_init

Return the result of calling crypto_register_alg() directly and remove the local return variable.

---
 crypto/khazad.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
crypto/khazad.c +1 -4
index 024264ee9cd1..dee54ad5f0e4 100644
@@ -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)
Signature · 2 lines
Thorsten Blum <[email protected]>
GPG: 1D60 735E 8AEF 3BE4 73B6  9D84 7336 78FD 8DFE EAD4
maintainer
#1 lore raw
Quoted 7 lines · Thorsten Blum

Return the result of calling crypto_register_alg() directly and remove the local return variable.

---
 crypto/khazad.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt