The else block after the return statement is unnecessary since
execution does not continue past the return statement.
Remove the else block while preserving logic making the code cleaner
and more readable.
reported by checkpatch:
WARNING: else is not generally useful after a break or return
Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
Reviewed-by: Julia Lawall <julia.lawall@inria.fr>
Link: https://lore.kernel.org/r/Z+LA2eeFRL+K0KCy@HP-650
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid);
- if (iEntry < 0) {
+ if (iEntry < 0)
return ielength;
- } else {
- if (authmode == WLAN_EID_RSN)
- ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
- }
+
+ if (authmode == WLAN_EID_RSN)
+ ielength = rtw_append_pmkid(adapter, iEntry, out_ie, ielength);
+
return ielength;
}