]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: r8188eu: remove a variable
authorMartin Kaiser <martin@kaiser.cx>
Sat, 26 Nov 2022 16:01:29 +0000 (17:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2022 12:28:59 +0000 (13:28 +0100)
Check the result of rtw_check_bcn_info directly and remove the ret
variable.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221126160129.178697-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c

index 362313c49c526ffde216da8e6bbbcbb94542b660..d32b2d569e237899a3b9beb28e4f62b85688d324 100644 (file)
@@ -555,7 +555,6 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
        u8 *pframe = precv_frame->rx_data;
        uint len = precv_frame->len;
        struct wlan_bssid_ex *pbss;
-       int ret = _SUCCESS;
        u8 *ie_ptr;
        u32 ie_len;
 
@@ -600,8 +599,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame)
                if (!psta)
                        return;
 
-               ret = rtw_check_bcn_info(padapter, pframe, len);
-               if (!ret) {
+               if (rtw_check_bcn_info(padapter, pframe, len) != _SUCCESS) {
                        receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 0);
                        return;
                }