[PATCH 2/2] crypto: img-hash - drop redundant return variable

From: Thorsten Blum

Date: Sat Mar 28 2026 - 06:21:40 EST


In img_hash_digest(), remove the redundant return variable 'err' and
return img_hash_handle_queue() directly.

Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
drivers/crypto/img-hash.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c
index f2d00b1d6b24..c0467185ee42 100644
--- a/drivers/crypto/img-hash.c
+++ b/drivers/crypto/img-hash.c
@@ -629,7 +629,6 @@ static int img_hash_digest(struct ahash_request *req)
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm);
struct img_hash_request_ctx *ctx = ahash_request_ctx(req);
- int err;

spin_lock(&img_hash.lock);
if (!tctx->hdev)
@@ -666,9 +665,7 @@ static int img_hash_digest(struct ahash_request *req)
ctx->sgfirst = req->src;
ctx->nents = sg_nents(ctx->sg);

- err = img_hash_handle_queue(ctx->hdev, req);
-
- return err;
+ return img_hash_handle_queue(ctx->hdev, req);
}

static int img_hash_cra_init(struct crypto_tfm *tfm, const char *alg_name)