linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "zhengbin (A)" <zhengbin13@huawei.com>
To: <pkshih@realtek.com>, <kvalo@codeaurora.org>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH v2] rtlwifi: rtl8192ee: Remove set but not used variable 'err'
Date: Fri, 4 Oct 2019 10:36:16 +0800	[thread overview]
Message-ID: <2ca176f2-e9ef-87cd-7f7d-cd51c67da38b@huawei.com> (raw)

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(-)

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)
--
2.7.4



             reply	other threads:[~2019-10-04  2:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04  2:36 zhengbin (A) [this message]
2019-10-04  3:10 ` [PATCH v2] rtlwifi: rtl8192ee: Remove set but not used variable 'err' Pkshih
2019-10-09  8:21 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ca176f2-e9ef-87cd-7f7d-cd51c67da38b@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).