rtlwifi: rtl8188ee: remove redundant assignment to variable cond
diff mbox series

Message ID 20200114165601.374597-1-colin.king@canonical.com
State Accepted
Commit c3a913357c3e3d2225a83508f06ece01f5bada20
Delegated to: Kalle Valo
Headers show
Series
  • rtlwifi: rtl8188ee: remove redundant assignment to variable cond
Related show

Commit Message

Colin King Jan. 14, 2020, 4:56 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable cond is being assigned with a value that is never
read, it is assigned a new value later on. The assignment is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pkshih Jan. 15, 2020, 1:46 a.m. UTC | #1
On Tue, 2020-01-14 at 16:56 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable cond is being assigned with a value that is never
> read, it is assigned a new value later on. The assignment is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Thank you!!

> ---
>  drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> index 5ca900f97d66..d13983ec09ad 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
> @@ -264,7 +264,7 @@ static bool _rtl88e_check_condition(struct ieee80211_hw
> *hw,
>  	u32 _board = rtlefuse->board_type; /*need efuse define*/
>  	u32 _interface = rtlhal->interface;
>  	u32 _platform = 0x08;/*SupportPlatform */
> -	u32 cond = condition;
> +	u32 cond;
>  
>  	if (condition == 0xCDCDCDCD)
>  		return true;
Kalle Valo Jan. 26, 2020, 3:45 p.m. UTC | #2
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable cond is being assigned with a value that is never
> read, it is assigned a new value later on. The assignment is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-drivers-next.git, thanks.

c3a913357c3e rtlwifi: rtl8188ee: remove redundant assignment to variable cond

Patch
diff mbox series

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
index 5ca900f97d66..d13983ec09ad 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c
@@ -264,7 +264,7 @@  static bool _rtl88e_check_condition(struct ieee80211_hw *hw,
 	u32 _board = rtlefuse->board_type; /*need efuse define*/
 	u32 _interface = rtlhal->interface;
 	u32 _platform = 0x08;/*SupportPlatform */
-	u32 cond = condition;
+	u32 cond;
 
 	if (condition == 0xCDCDCDCD)
 		return true;