Skip to contentSkip to conversation

crypto: atmel-sha: Removed unused variable "err"

PATCH In review Pathak, Rahul (R.) 2 participants 2 messages Dec 14, 2015 – Dec 17, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Rahul Pathak <[email protected]>

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

---
 drivers/crypto/atmel-sha.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/crypto/atmel-sha.c +1 -2
index 660d8c0..20de861 100644
@@ -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)
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 8 lines · Rahul (R.)

From: Rahul Pathak <[email protected]>

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

Both patches applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt