diff mbox series

[linux-next] wifi: cfg80211: remove redundant err variable

Message ID 20220829115516.267647-1-cui.jinpeng2@zte.com.cn (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series [linux-next] wifi: cfg80211: remove redundant err variable | expand

Commit Message

CGEL Aug. 29, 2022, 11:55 a.m. UTC
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

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>
---
 .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c    | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Ammar Faizi Aug. 29, 2022, 12:27 p.m. UTC | #1
On Mon, Aug 29, 2022 at 7:12 PM wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> 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>

Reviewed-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Kalle Valo Aug. 29, 2022, 4:13 p.m. UTC | #2
cgel.zte@gmail.com writes:

> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> 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>
> ---
>  .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c    | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)

The title should be:

wifi: brcmfmac: remove redundant err variable

Please read our documentation:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_title_is_wrong
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 7c72ea26a7d7..8a8c5a3bb2fb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -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,
+	return brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_list,
 				       sizeof(*pmk_list));
-
-	return err;
 }
 
 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