]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: img-hash - drop redundant return variable
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 28 Mar 2026 10:20:46 +0000 (11:20 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Apr 2026 00:56:13 +0000 (08:56 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/img-hash.c

index f2d00b1d6b24a051f6eae25afb45123bc8fb6d0a..c0467185ee42858cc2e7bd6c67ad9c8a0de0662a 100644 (file)
@@ -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)