From: Shiva Kerdel Date: Mon, 21 Nov 2016 09:12:41 +0000 (+0100) Subject: Staging: rtl8712: rtl871x_*: Removed unnecessary else statements after a break or... X-Git-Tag: v4.10-rc1~148^2~126 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=08711b876d3f1ea0b62b84b68214087e5bca21b7;p=karo-tx-linux.git Staging: rtl8712: rtl871x_*: Removed unnecessary else statements after a break or return The indent code blocks of the else statements were unnecessary and are better written without them. Signed-off-by: Shiva Kerdel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index 475e7904fe45..590acb5aea3d 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 5df1273e75cd..35cbdc71cad4 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -1343,8 +1343,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) {