]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: rtl8712: remove else after return statement
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Wed, 11 Mar 2015 22:08:32 +0000 (01:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2015 14:48:20 +0000 (15:48 +0100)
else after return generally is not useful. This patch removes else after return
statement. Issue addressed by checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_mlme.c

index ef8a10e568b5819977c417bca59ef430bc0675bd..9b13de1437a109178e643d8a1a91757056c25955 100644 (file)
@@ -1597,17 +1597,15 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie,
        iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
        if (iEntry < 0)
                return ielength;
-       else {
-               if (authmode == _WPA2_IE_ID_) {
-                       out_ie[ielength] = 1;
-                       ielength++;
-                       out_ie[ielength] = 0;   /*PMKID count = 0x0100*/
-                       ielength++;
-                       memcpy(&out_ie[ielength],
-                               &psecuritypriv->PMKIDList[iEntry].PMKID, 16);
-                       ielength += 16;
-                       out_ie[13] += 18;/*PMKID length = 2+16*/
-               }
+       if (authmode == _WPA2_IE_ID_) {
+               out_ie[ielength] = 1;
+               ielength++;
+               out_ie[ielength] = 0;   /*PMKID count = 0x0100*/
+               ielength++;
+               memcpy(&out_ie[ielength],
+                       &psecuritypriv->PMKIDList[iEntry].PMKID, 16);
+               ielength += 16;
+               out_ie[13] += 18;/*PMKID length = 2+16*/
        }
        return ielength;
 }