wcn36xx: drop unnecessary initialization of variables
PATCH 1/1 wcn36xx: drop unnecessary initialization of variables
Initialization is unneccessary when the variable is written before it is read. There were some occasions in which the driver would initialize `ret' during declaration without need.
Purely a cosmetic change with no functional impact.
Signed-off-by Daniel Mack <[email protected]>
--- drivers/net/wireless/ath/wcn36xx/main.c | 4 +- drivers/net/wireless/ath/wcn36xx/smd.c | 75 ++++++++++++------------- 2 files changed, 38 insertions(+), 41 deletions(-)
drivers/net/wireless/ath/wcn36xx/main.c +1 -3
@@ -1161,8 +1161,6 @@ static const struct ieee80211_ops wcn36xx_ops = {static int wcn36xx_init_ieee80211 (struct wcn36xx *wcn) { -int ret =0 ; -static const u32 cipher_suites[] = {WLAN_CIPHER_SUITE_WEP40 ,WLAN_CIPHER_SUITE_WEP104 ,
@@ -1209,7 +1207,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)wiphy_ext_feature_set (wcn->hw->wiphy,NL80211_EXT_FEATURE_CQM_RSSI_LIST ); -return ret; +return 0 ; } static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
drivers/net/wireless/ath/wcn36xx/smd.c +37 -38
297 lines not on this page · raw message
Signature · 1 line
2.17.1
Quoted 8 lines · Daniel Mack
Initialization is unneccessary when the variable is written before it is read. There were some occasions in which the driver would initialize `ret' during declaration without need.
Purely a cosmetic change with no functional impact.
Signed-off-by Daniel Mack <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
f0eea2772a6b wcn36xx: drop unnecessary initialization of variables
Signature · 3 lines
https://patchwork.kernel.org/patch/10496515/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches