From: Thorsten Blum <thorsten.blum@linux.dev>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] crypto: img-hash - drop redundant return variable
Date: Sat, 28 Mar 2026 11:20:46 +0100 [thread overview]
Message-ID: <20260328102043.85271-6-thorsten.blum@linux.dev> (raw)
In-Reply-To: <20260328102043.85271-4-thorsten.blum@linux.dev>
In img_hash_digest(), remove the redundant return variable 'err' and
return img_hash_handle_queue() directly.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
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)
next prev parent reply other threads:[~2026-03-28 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 10:20 [PATCH 1/2] crypto: img-hash - use list_first_entry_or_null to simplify digest Thorsten Blum
2026-03-28 10:20 ` Thorsten Blum [this message]
2026-04-03 1:09 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260328102043.85271-6-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.