From patchwork Fri Oct 4 02:36:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zheng Bin X-Patchwork-Id: 11173619 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E84E112B for ; Fri, 4 Oct 2019 02:36:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65F1320865 for ; Fri, 4 Oct 2019 02:36:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731951AbfJDCgg (ORCPT ); Thu, 3 Oct 2019 22:36:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52336 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728360AbfJDCgg (ORCPT ); Thu, 3 Oct 2019 22:36:36 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9083BD9F2CCEE641D326; Fri, 4 Oct 2019 10:36:34 +0800 (CST) Received: from [127.0.0.1] (10.184.213.217) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Fri, 4 Oct 2019 10:36:27 +0800 To: , , , CC: From: "zhengbin (A)" Subject: [PATCH v2] rtlwifi: rtl8192ee: Remove set but not used variable 'err' Message-ID: <2ca176f2-e9ef-87cd-7f7d-cd51c67da38b@huawei.com> Date: Fri, 4 Oct 2019 10:36:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [10.184.213.217] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 Signed-off-by: zhengbin Acked-by: Ping-Ke Shih ---  drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 5 +----  1 file changed, 1 insertion(+), 4 deletions(-) -- 2.7.4 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)