mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Janani Sankara Babu <jananis37@gmail.com>
To: gregkh@linuxfoundation.org
Cc: insafonov@gmail.com, gs051095@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Janani Sankara Babu <jananis37@gmail.com>
Subject: [PATCH V2] staging:rtl8188eu:core Fix remove unneccessary else block
Date: Fri,  1 Sep 2017 12:32:53 +0530	[thread overview]
Message-ID: <1504249373-8143-1-git-send-email-jananis37@gmail.com> (raw)

This patch removes the unwanted braces and else statement inside the
function 'SecIsInPMKIDList'

Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
Changelog
V1 : Removed the else statement & Curly braces in If statement 
V2 : Removed the comment and added preincrement of i inside the while loop
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index d3668ca..9c2571d 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -1708,14 +1708,9 @@ static int SecIsInPMKIDList(struct adapter *Adapter, u8 *bssid)
 
 	do {
 		if ((psecuritypriv->PMKIDList[i].bUsed) &&
-		    (!memcmp(psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN))) {
+		    (!memcmp(psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN)))
 			break;
-		} else {
-			i++;
-			/* continue; */
-		}
-
-	} while (i < NUM_PMKID_CACHE);
+	} while (++i < NUM_PMKID_CACHE);
 
 	if (i == NUM_PMKID_CACHE)
 		i = -1;/*  Could not find. */
-- 
1.9.1

                 reply	other threads:[~2017-09-01  7:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1504249373-8143-1-git-send-email-jananis37@gmail.com \
    --to=jananis37@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gs051095@gmail.com \
    --cc=insafonov@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome