crypto: squash lines for simple wrapper functions
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 12 Sep 2016 19:27:54 +0000 (04:27 +0900)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 13 Sep 2016 12:27:26 +0000 (20:27 +0800)
Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/crct10dif_generic.c
crypto/mcryptd.c
drivers/crypto/hifn_795x.c

index c122961..8e94e29 100644 (file)
@@ -107,10 +107,7 @@ static struct shash_alg alg = {
 
 static int __init crct10dif_mod_init(void)
 {
-       int ret;
-
-       ret = crypto_register_shash(&alg);
-       return ret;
+       return crypto_register_shash(&alg);
 }
 
 static void __exit crct10dif_mod_fini(void)
index 86fb59b..94ee44a 100644 (file)
@@ -612,12 +612,7 @@ EXPORT_SYMBOL_GPL(mcryptd_alloc_ahash);
 
 int ahash_mcryptd_digest(struct ahash_request *desc)
 {
-       int err;
-
-       err = crypto_ahash_init(desc) ?:
-             ahash_mcryptd_finup(desc);
-
-       return err;
+       return crypto_ahash_init(desc) ?: ahash_mcryptd_finup(desc);
 }
 
 int ahash_mcryptd_update(struct ahash_request *desc)
index eee2c7e..e09d405 100644 (file)
@@ -636,20 +636,12 @@ struct hifn_request_context {
 
 static inline u32 hifn_read_0(struct hifn_device *dev, u32 reg)
 {
-       u32 ret;
-
-       ret = readl(dev->bar[0] + reg);
-
-       return ret;
+       return readl(dev->bar[0] + reg);
 }
 
 static inline u32 hifn_read_1(struct hifn_device *dev, u32 reg)
 {
-       u32 ret;
-
-       ret = readl(dev->bar[1] + reg);
-
-       return ret;
+       return readl(dev->bar[1] + reg);
 }
 
 static inline void hifn_write_0(struct hifn_device *dev, u32 reg, u32 val)