2020-09-21 08:03:40

by Liu Shixin

[permalink] [raw]
Subject: [PATCH -next] crypto: cpt - simplify the return expression of cav_register_algs

Simplify the return expression.

Signed-off-by: Liu Shixin <[email protected]>
---
drivers/crypto/cavium/cpt/cptvf_algs.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/crypto/cavium/cpt/cptvf_algs.c b/drivers/crypto/cavium/cpt/cptvf_algs.c
index 5af0dc2a8909..ce3b91c612f0 100644
--- a/drivers/crypto/cavium/cpt/cptvf_algs.c
+++ b/drivers/crypto/cavium/cpt/cptvf_algs.c
@@ -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)
--
2.25.1


2020-10-02 11:54:55

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: cpt - simplify the return expression of cav_register_algs

On Mon, Sep 21, 2020 at 04:24:28PM +0800, Liu Shixin wrote:
> Simplify the return expression.
>
> Signed-off-by: Liu Shixin <[email protected]>
> ---
> drivers/crypto/cavium/cpt/cptvf_algs.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)

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