LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 3/5] drivers/net/wireless/brcm80211/brcmsmac/stf.c: don't use unmodified return variable name
@ 2015-03-16 14:16 Peter Teoh
  0 siblings, 0 replies; only message in thread
From: Peter Teoh @ 2015-03-16 14:16 UTC (permalink / raw)
  To: Brett Rudley, Arend van Spriel, Franky (Zhenhui) Lin,
	Hante Meuleman, LKML

Discovered by Coccinelle.   Removed the use of variable for storing
returning values, which is un-modified / un-used throughout.

Signed-off-by: Peter Teoh <htmldeveloper@gmail.com

diff -u -p a/drivers/net/wireless/brcm80211/brcmsmac/stf.c
b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
--- a/drivers/net/wireless/brcm80211/brcmsmac/stf.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
@@ -306,7 +306,6 @@ int brcms_c_stf_txchain_set(struct brcms
  */
 int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
 {
-       int ret_code = 0;
        u8 prev_stf_ss;
        u8 upd_stf_ss;

@@ -325,7 +324,7 @@ int brcms_c_stf_ss_update(struct brcms_c
                                    PHY_TXC1_MODE_SISO : PHY_TXC1_MODE_CDD;
        } else {
                if (wlc->band != band)
-                       return ret_code;
+                       return 0;
                upd_stf_ss = (wlc->stf->txstreams == 1) ?
                                PHY_TXC1_MODE_SISO : band->band_stf_ss_mode;
        }
@@ -334,7 +333,7 @@ int brcms_c_stf_ss_update(struct brcms_c
                brcms_b_band_stf_ss_set(wlc->hw, upd_stf_ss);
        }

-       return ret_code;
+       return 0;
 }

 int brcms_c_stf_attach(struct brcms_c_info *wlc)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-16 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16 14:16 [PATCH 3/5] drivers/net/wireless/brcm80211/brcmsmac/stf.c: don't use unmodified return variable name Peter Teoh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).