diff mbox series

brcmsmac: make brcms_c_set_mac() void

Message ID 20200410090817.26883-1-yanaijie@huawei.com (mailing list archive)
State Accepted
Commit fd7fb0253cdf96241308336e7833186b928336a8
Delegated to: Kalle Valo
Headers show
Series brcmsmac: make brcms_c_set_mac() void | expand

Commit Message

Jason Yan April 10, 2020, 9:08 a.m. UTC
Fix the following coccicheck warning:

drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3773:5-8:
Unneeded variable: "err". Return "0" on line 3781

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Arend van Spriel April 10, 2020, 9:11 a.m. UTC | #1
On 4/10/2020 11:08 AM, Jason Yan wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3773:5-8:
> Unneeded variable: "err". Return "0" on line 3781

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
Kalle Valo April 14, 2020, 3:10 p.m. UTC | #2
Jason Yan <yanaijie@huawei.com> wrote:

> Fix the following coccicheck warning:
> 
> drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3773:5-8:
> Unneeded variable: "err". Return "0" on line 3781
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Patch applied to wireless-drivers-next.git, thanks.

fd7fb0253cdf brcmsmac: make brcms_c_set_mac() void
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
index 7f2c15c799d2..d88f8d456b94 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
@@ -3768,17 +3768,14 @@  static void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc)
  * Write this BSS config's MAC address to core.
  * Updates RXE match engine.
  */
-static int brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
+static void brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
 {
-	int err = 0;
 	struct brcms_c_info *wlc = bsscfg->wlc;
 
 	/* enter the MAC addr into the RXE match registers */
 	brcms_c_set_addrmatch(wlc, RCM_MAC_OFFSET, wlc->pub->cur_etheraddr);
 
 	brcms_c_ampdu_macaddr_upd(wlc);
-
-	return err;
 }
 
 /* Write the BSS config's BSSID address to core (set_bssid in d11procs.tcl).