Patchwork [4/6] rtlwifi: rtl8192cu: Fix W=1 build warning

login
register
mail settings
Submitter Larry Finger
Date Feb. 1, 2013, 4:40 p.m.
Message ID <1359736827-30977-5-git-send-email-Larry.Finger@lwfinger.net>
Download mbox | patch
Permalink /patch/217523/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Larry Finger - Feb. 1, 2013, 4:40 p.m.
When this driver is built with "make W=1", the following warning is output:

drivers/net/wireless/rtlwifi/rtl8192cu/sw.c:56:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
index b7e6607..d9e659f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -76,7 +76,7 @@  static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
 				      GFP_KERNEL, hw, rtl_fw_cb);
 
 
-	return 0;
+	return err;
 }
 
 static void rtl92cu_deinit_sw_vars(struct ieee80211_hw *hw)