[PATCH] crypto: cesa - Simplify return statement in mv_cesa_dequeue_req_locked

Thorsten Blum posted 1 patch 6 days, 14 hours ago
drivers/crypto/marvell/cesa/cesa.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
[PATCH] crypto: cesa - Simplify return statement in mv_cesa_dequeue_req_locked
Posted by Thorsten Blum 6 days, 14 hours ago
Return the result of calling crypto_dequeue_request() directly and
remove the local return variable.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/crypto/marvell/cesa/cesa.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/crypto/marvell/cesa/cesa.c b/drivers/crypto/marvell/cesa/cesa.c
index 301bdf239e7d..8afa3a87e38d 100644
--- a/drivers/crypto/marvell/cesa/cesa.c
+++ b/drivers/crypto/marvell/cesa/cesa.c
@@ -38,15 +38,9 @@ struct crypto_async_request *
 mv_cesa_dequeue_req_locked(struct mv_cesa_engine *engine,
 			   struct crypto_async_request **backlog)
 {
-	struct crypto_async_request *req;
-
 	*backlog = crypto_get_backlog(&engine->queue);
-	req = crypto_dequeue_request(&engine->queue);
-
-	if (!req)
-		return NULL;
 
-	return req;
+	return crypto_dequeue_request(&engine->queue);
 }
 
 static void mv_cesa_rearm_engine(struct mv_cesa_engine *engine)
-- 
Thorsten Blum <thorsten.blum@linux.dev>
GPG: 1D60 735E 8AEF 3BE4 73B6  9D84 7336 78FD 8DFE EAD4
Re: [PATCH] crypto: cesa - Simplify return statement in mv_cesa_dequeue_req_locked
Posted by Herbert Xu 1 day, 1 hour ago
On Sat, Jan 31, 2026 at 10:42:47PM +0100, Thorsten Blum wrote:
> Return the result of calling crypto_dequeue_request() directly and
> remove the local return variable.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/crypto/marvell/cesa/cesa.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

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