public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging:ccree Fix dont use assignment in if condition
@ 2017-09-21  6:37 Janani Sankara Babu
  2017-09-22  8:55 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Janani Sankara Babu @ 2017-09-21  6:37 UTC (permalink / raw)
  To: gregkh
  Cc: gilad, linux-crypto, driverdev-devel, devel, linux-kernel,
	Janani Sankara Babu

This patch solves the following error shown by checkpatch script
ERROR: do not use assignment in if condition

Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
 drivers/staging/ccree/ssi_hash.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index ae8f36a..08eaa56 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -601,8 +601,8 @@ static int ssi_hash_update(struct ahash_req_ctx *state,
 		/* no real updates required */
 		return 0;
 	}
-
-	if (unlikely(rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, src, nbytes, block_size))) {
+	rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, src, nbytes, block_size);
+	if (unlikely(rc)) {
 		if (rc == 1) {
 			SSI_LOG_DEBUG(" data size not require HW update %x\n",
 				     nbytes);
@@ -1403,8 +1403,8 @@ static int ssi_mac_update(struct ahash_request *req)
 	}
 
 	state->xcbc_count++;
-
-	if (unlikely(rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, req->src, req->nbytes, block_size))) {
+	rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, req->src, req->nbytes, block_size);
+	if (unlikely(rc)) {
 		if (rc == 1) {
 			SSI_LOG_DEBUG(" data size not require HW update %x\n",
 				     req->nbytes);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-22 10:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21  6:37 [PATCH] staging:ccree Fix dont use assignment in if condition Janani Sankara Babu
2017-09-22  8:55 ` Greg KH
     [not found]   ` <CACHTOGqqZCzNDoxvnXfwZhMBg9WOgynx85eaBydz_wUz=-bQWA@mail.gmail.com>
2017-09-22 10:59     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox