staging: rtl8188eu: refactor if else statement
authorMichael Straube <straube.linux@gmail.com>
Fri, 23 Nov 2018 20:41:03 +0000 (21:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2018 19:59:05 +0000 (20:59 +0100)
Refactor if else statement to clear checkpatch warnings.
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme.c

index 9cc7d5b..513b6d8 100644 (file)
@@ -1758,12 +1758,9 @@ int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
        }
 
        iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
-       if (iEntry < 0) {
-               return ielength;
-       } else {
-               if (authmode == _WPA2_IE_ID_)
-                       ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
-       }
+       if (iEntry >= 0 && authmode == _WPA2_IE_ID_)
+               ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
+
        return ielength;
 }