Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290970 > unrolled thread

[PATCH 1/2] crypto: atmel-sha: Removed unused variable "err"

Started by"Pathak, Rahul (R.)" <rpathak@visteon.com>
First post2015-12-14 09:50 +0100
Last post2015-12-17 09:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] crypto: atmel-sha: Removed unused variable "err" "Pathak, Rahul (R.)" <rpathak@visteon.com> - 2015-12-14 09:50 +0100
    Re: [PATCH 1/2] crypto: atmel-sha: Removed unused variable "err" Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-17 09:50 +0100

#1290970 — [PATCH 1/2] crypto: atmel-sha: Removed unused variable "err"

From"Pathak, Rahul (R.)" <rpathak@visteon.com>
Date2015-12-14 09:50 +0100
Subject[PATCH 1/2] crypto: atmel-sha: Removed unused variable "err"
Message-ID<qFwZr-3HK-1@gated-at.bofh.it>
From: Rahul Pathak <rpathak@visteon.com>

Removed unused variable "err" and directly return "0"

Reported by coccicheck -
./drivers/crypto/atmel-sha.c:758:5-8: Unneeded variable: "err". Return "0" on line 766

Signed-off-by: Rahul Pathak <rpathak@visteon.com>
---
 drivers/crypto/atmel-sha.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index 660d8c0..20de861 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -755,7 +755,6 @@ static int atmel_sha_finish(struct ahash_request *req)
 {
 	struct atmel_sha_reqctx *ctx = ahash_request_ctx(req);
 	struct atmel_sha_dev *dd = ctx->dd;
-	int err = 0;
 
 	if (ctx->digcnt[0] || ctx->digcnt[1])
 		atmel_sha_copy_ready_hash(req);
@@ -763,7 +762,7 @@ static int atmel_sha_finish(struct ahash_request *req)
 	dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1],
 		ctx->digcnt[0], ctx->bufcnt);
 
-	return err;
+	return 0;
 }
 
 static void atmel_sha_finish_req(struct ahash_request *req, int err)
-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1293676

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2015-12-17 09:50 +0100
Message-ID<qGCq6-5pv-7@gated-at.bofh.it>
In reply to#1290970
On Mon, Dec 14, 2015 at 08:44:19AM +0000, Pathak, Rahul (R.) wrote:
> From: Rahul Pathak <rpathak@visteon.com>
> 
> Removed unused variable "err" and directly return "0"
> 
> Reported by coccicheck -
> ./drivers/crypto/atmel-sha.c:758:5-8: Unneeded variable: "err". Return "0" on line 766
> 
> Signed-off-by: Rahul Pathak <rpathak@visteon.com>

Both patches 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web