crypto: engine - Make crypto_engine_exit() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 23 Sep 2023 10:08:06 +0000 (12:08 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 1 Oct 2023 08:28:15 +0000 (16:28 +0800)
All callers ignore the return value, so simplify by not providing one.

Note that crypto_engine_exit() is typically called in a device driver's
remove path (or the error path in probe), where errors cannot be handled
anyhow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/crypto_engine.c
include/crypto/engine.h

index 108d9d55c509b54c6b894ba3b08e717e019c554f..e60a0eb628e8a03a49c389d142f8f4394f9f5c1c 100644 (file)
@@ -552,20 +552,16 @@ EXPORT_SYMBOL_GPL(crypto_engine_alloc_init);
 /**
  * crypto_engine_exit - free the resources of hardware engine when exit
  * @engine: the hardware engine need to be freed
- *
- * Return 0 for success.
  */
-int crypto_engine_exit(struct crypto_engine *engine)
+void crypto_engine_exit(struct crypto_engine *engine)
 {
        int ret;
 
        ret = crypto_engine_stop(engine);
        if (ret)
-               return ret;
+               return;
 
        kthread_destroy_worker(engine->kworker);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(crypto_engine_exit);
 
index 2835069c5997eed8fc7dfadcbb217b6592d4a507..545dbefe3e13c6b790174c82590170100a6ae56d 100644 (file)
@@ -78,7 +78,7 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev,
                                                       bool retry_support,
                                                       int (*cbk_do_batch)(struct crypto_engine *engine),
                                                       bool rt, int qlen);
-int crypto_engine_exit(struct crypto_engine *engine);
+void crypto_engine_exit(struct crypto_engine *engine);
 
 int crypto_engine_register_aead(struct aead_engine_alg *alg);
 void crypto_engine_unregister_aead(struct aead_engine_alg *alg);