Skip to contentSkip to conversation

wcn36xx: drop unnecessary initialization of variables

PATCH In review Daniel Mack 2 participants 2 messages Jun 29, 2018 – Jul 2, 2018 Qualcomm WCN36XX wireless driver

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index e38443ecaab4..79998a3ddb7a 100644
@@ -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
#1 lore raw
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.

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