wifi: brcmfmac: remove redundant variable err
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>
Wed, 31 Aug 2022 13:22:54 +0000 (13:22 +0000)
committerKalle Valo <kvalo@kernel.org>
Wed, 7 Sep 2022 08:01:40 +0000 (11:01 +0300)
Return value from brcmf_fil_iovar_data_set() and
brcmf_config_ap_mgmt_ie() directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220831132254.303697-1-cui.jinpeng2@zte.com.cn
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index 3e8fa2e..4206814 100644 (file)
@@ -3988,7 +3988,6 @@ brcmf_update_pmklist(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp)
        struct brcmf_pmk_list_le *pmk_list;
        int i;
        u32 npmk;
-       s32 err;
 
        pmk_list = &cfg->pmk_list;
        npmk = le32_to_cpu(pmk_list->npmk);
@@ -3997,10 +3996,8 @@ brcmf_update_pmklist(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp)
        for (i = 0; i < npmk; i++)
                brcmf_dbg(CONN, "PMK[%d]: %pM\n", i, &pmk_list->pmk[i].bssid);
 
-       err = brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_list,
-                                      sizeof(*pmk_list));
-
-       return err;
+       return brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_list,
+                       sizeof(*pmk_list));
 }
 
 static s32
@@ -5046,13 +5043,10 @@ brcmf_cfg80211_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
                             struct cfg80211_beacon_data *info)
 {
        struct brcmf_if *ifp = netdev_priv(ndev);
-       s32 err;
 
        brcmf_dbg(TRACE, "Enter\n");
 
-       err = brcmf_config_ap_mgmt_ie(ifp->vif, info);
-
-       return err;
+       return brcmf_config_ap_mgmt_ie(ifp->vif, info);
 }
 
 static int