crypto: cpt - simplify the return expression of cav_register_algs
authorLiu Shixin <liushixin2@huawei.com>
Mon, 21 Sep 2020 08:24:28 +0000 (16:24 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Oct 2020 08:02:10 +0000 (18:02 +1000)
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/cavium/cpt/cptvf_algs.c

index 5af0dc2..ce3b91c 100644 (file)
@@ -451,13 +451,7 @@ static struct skcipher_alg algs[] = { {
 
 static inline int cav_register_algs(void)
 {
-       int err = 0;
-
-       err = crypto_register_skciphers(algs, ARRAY_SIZE(algs));
-       if (err)
-               return err;
-
-       return 0;
+       return crypto_register_skciphers(algs, ARRAY_SIZE(algs));
 }
 
 static inline void cav_unregister_algs(void)