Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbcKUJNj (ORCPT ); Mon, 21 Nov 2016 04:13:39 -0500 Received: from web01.01d.eu ([5.200.27.195]:54420 "EHLO web01.01d.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbcKUJNh (ORCPT ); Mon, 21 Nov 2016 04:13:37 -0500 From: Shiva Kerdel To: Larry.Finger@lwfinger.net Cc: florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, alan@linux.intel.com, bhaktipriya96@gmail.com, omriarad3@gmail.com, arnd@arndb.de, geliangtang@163.com, gnomes@lxorguk.ukuu.org.uk, dan.carpenter@oracle.com, raphael.beamonte@gmail.com, bhumirks@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Shiva Kerdel Subject: [PATCH] Staging: rtl8712: rtl871x_*: Removed unnecessary else statements after a break or return Date: Mon, 21 Nov 2016 10:12:41 +0100 Message-Id: <20161121091241.5050-1-shiva@exdev.nl> X-Mailer: git-send-email 2.10.2 X-Authenticated-Id: shiva@exdev.nl Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1353 Lines: 42 The indent code blocks of the else statements were unnecessary and are better written without them. Signed-off-by: Shiva Kerdel --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++-- drivers/staging/rtl8712/rtl871x_mlme.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 475e790..590acb5 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -588,9 +588,9 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie, netdev_info(padapter->pnetdev, "r8712u: SET WPS_IE, wps_phase==true\n"); cnt += buf[cnt + 1] + 2; break; - } else { - cnt += buf[cnt + 1] + 2; } + + cnt += buf[cnt + 1] + 2; } } } diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index c1feef3..8e98f2e 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -1347,8 +1347,8 @@ static int SecIsInPMKIDList(struct _adapter *Adapter, u8 *bssid) (!memcmp(psecuritypriv->PMKIDList[i].Bssid, bssid, ETH_ALEN))) break; - else - i++; + i++; + } while (i < NUM_PMKID_CACHE); if (i == NUM_PMKID_CACHE) { -- 2.10.2