summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorMichael Straube <straube.linux@gmail.com>2018-11-23 21:41:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-26 20:59:05 +0100
commitc202e1ab78e398a7729f633f4524bdfe4b4a774e (patch)
treeb52e65398fb024fb6db998d14b0342cf0c9b2032 /drivers/staging/rtl8188eu
parent794f81656692acfda5639bef9afe117969aa6fd1 (diff)
downloadlinux-c202e1ab78e398a7729f633f4524bdfe4b4a774e.tar.bz2
staging: rtl8188eu: refactor if else statement
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>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_mlme.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 9cc7d5b8293c..513b6d89a0de 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -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;
}