]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: rtl8723bs: fix unbalanced braces in 3 files
authorJennifer Guo <guojy.bj@gmail.com>
Tue, 12 May 2026 05:46:55 +0000 (22:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 May 2026 09:21:08 +0000 (11:21 +0200)
Add missing braces to if/else statements to comply with kernel coding
style.

This fixes the following checkpatch.pl checks:
- CHECK: Unbalanced braces around else statement
- CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260512054655.4800-1-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_efuse.c
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/core/rtw_xmit.c

index 803a608b74fa5fa9d348d5c7065a18e304258c8a..a40d6eab724969a47c0e6b6b290dd672d17d23e1 100644 (file)
@@ -76,9 +76,9 @@ u16           Address)
                                break;
                }
                return rtw_read8(Adapter, EFUSE_CTRL);
-       } else
+       } else {
                return 0xFF;
-
+       }
 } /* rtw_efuse_read_1_byte */
 
 /*  11/16/2008 MH Read one byte from real Efuse. */
index 963b53027c683f8a53d3d9430be3d89bcd404270..6be53e6df1f51e5988d1d4321122c7da2fff10e1 100644 (file)
@@ -742,9 +742,9 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
                                        } else {
                                                pmlmepriv->to_join = true;
                                        }
-                               } else
+                               } else {
                                        rtw_indicate_disconnect(adapter);
-
+                               }
                                _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
                        }
                }
@@ -1554,15 +1554,17 @@ void rtw_mlme_reset_auto_scan_int(struct adapter *adapter)
        struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
-       if (pmlmeinfo->VHT_enable) /* disable auto scan when connect to 11AC AP */
+       if (pmlmeinfo->VHT_enable) {
+               /* disable auto scan when connect to 11AC AP */
                mlme->auto_scan_int_ms = 0;
-       else if (adapter->registrypriv.wifi_spec && is_client_associated_to_ap(adapter))
+       } else if (adapter->registrypriv.wifi_spec && is_client_associated_to_ap(adapter)) {
                mlme->auto_scan_int_ms = 60 * 1000;
-       else if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) {
+       else if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) {
                if (check_fwstate(mlme, WIFI_STATION_STATE) && check_fwstate(mlme, _FW_LINKED))
                        mlme->auto_scan_int_ms = mlme->roam_scan_int_ms;
-       } else
+       } else {
                mlme->auto_scan_int_ms = 0; /* disabled */
+       }
 }
 
 static void rtw_auto_scan_handler(struct adapter *padapter)
@@ -2282,9 +2284,10 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
                        operation_bw = padapter->mlmeextpriv.cur_bwmode;
                        if (operation_bw > CHANNEL_WIDTH_40)
                                operation_bw = CHANNEL_WIDTH_40;
-               } else
+               } else {
                        /* TDLS: TODO 40? */
                        operation_bw = CHANNEL_WIDTH_40;
+               }
        } else {
                p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len);
                if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) {
index 458e471535ad56c5ce3404b84834fac58b3b01e1..a28830b4f4e7dad65d0152b482a3ffc0b0aa40f8 100644 (file)
@@ -2037,8 +2037,9 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
        } else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
                allow = true;
        else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
-       } else
+       } else {
                WARN_ON(1);
+       }
 
        return allow;
 }