diff mbox series

[v2] rtlwifi: rtl8192ee: Remove set but not used variable 'err'

Message ID 2ca176f2-e9ef-87cd-7f7d-cd51c67da38b@huawei.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series [v2] rtlwifi: rtl8192ee: Remove set but not used variable 'err' | expand

Commit Message

Zheng Bin Oct. 4, 2019, 2:36 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function rtl92ee_download_fw:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable err set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--
2.7.4

Comments

Ping-Ke Shih Oct. 4, 2019, 3:10 a.m. UTC | #1
On Fri, 2019-10-04 at 10:36 +0800, zhengbin (A) wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function
> rtl92ee_download_fw:
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable
> err set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>

Looks good to me. Thank you. 

Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Kalle Valo Oct. 9, 2019, 8:21 a.m. UTC | #2
"zhengbin (A)" <zhengbin13@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function rtl92ee_download_fw:
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable err set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Failed to apply:

fatal: corrupt patch at line 13
error: could not build fake ancestor
Applying: rtlwifi: rtl8192ee: Remove set but not used variable 'err'
Patch failed at 0001 rtlwifi: rtl8192ee: Remove set but not used variable 'err'
The copy of the patch that failed is found in: .git/rebase-apply/patch

Patch set to Changes Requested.
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
index 67305ce..0546242 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
@@ -108,7 +108,6 @@  int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
        struct rtlwifi_firmware_header *pfwheader;
        u8 *pfwdata;
        u32 fwsize;
-       int err;
        enum version_8192e version = rtlhal->version;

        if (!rtlhal->pfirmware)
@@ -146,9 +145,7 @@  int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
        _rtl92ee_write_fw(hw, version, pfwdata, fwsize);
        _rtl92ee_enable_fw_download(hw, false);

-       err = _rtl92ee_fw_free_to_go(hw);
-
-       return 0;
+       return _rtl92ee_fw_free_to_go(hw);
 }

 static bool _rtl92ee_check_fw_read_last_h2c(struct ieee80211_hw *hw, u8 boxnum)