diff mbox series

[-next] crypto: cpt - simplify the return expression of cav_register_algs

Message ID 20200921082428.2591094-1-liushixin2@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [-next] crypto: cpt - simplify the return expression of cav_register_algs | expand

Commit Message

Liu Shixin Sept. 21, 2020, 8:24 a.m. UTC
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/crypto/cavium/cpt/cptvf_algs.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Herbert Xu Oct. 2, 2020, 11:53 a.m. UTC | #1
On Mon, Sep 21, 2020 at 04:24:28PM +0800, Liu Shixin wrote:
> Simplify the return expression.
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>  drivers/crypto/cavium/cpt/cptvf_algs.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

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)