Skip to contentSkip to conversation

crypto: anubis - simplify return statement in anubis_mod_init

PATCH In review Thorsten Blum 2 participants 2 messages Sep 14, 2025 – Sep 20, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: anubis - simplify return statement in anubis_mod_init

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

---
 crypto/anubis.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
crypto/anubis.c +1 -4
index 4268c3833baa..4b01b6ec961a 100644
@@ -683,10 +683,7 @@ static struct crypto_alg anubis_alg = {
 
 static int __init anubis_mod_init(void)
 {
-	int ret = 0;
-
-	ret = crypto_register_alg(&anubis_alg);
-	return ret;
+	return crypto_register_alg(&anubis_alg);
 }
 
 static void __exit anubis_mod_fini(void)
Signature · 1 line
2.51.0
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/anubis.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