Commit e623d0f3 authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman

Staging: rtl8192e: Remove unnecessary variables

This patch removes unnecessary intermediary variables in return lines
and uses actual values.
Found by coccinelle using this semantic patch:

@@ type T; expression expr; identifier r; @@

-T r = expr;
... when != r
    when strict
-return r;
+return expr;
Signed-off-by: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b9733c1
...@@ -36,7 +36,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, ...@@ -36,7 +36,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
u32 buffer_len) u32 buffer_len)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
bool rt_status = true;
u16 frag_threshold; u16 frag_threshold;
u16 frag_length, frag_offset = 0; u16 frag_length, frag_offset = 0;
int i; int i;
...@@ -99,7 +98,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, ...@@ -99,7 +98,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
write_nic_byte(dev, TPPoll, TPPoll_CQ); write_nic_byte(dev, TPPoll, TPPoll_CQ);
return rt_status; return true;
} }
static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
......
...@@ -3059,7 +3059,6 @@ bool NicIFEnableNIC(struct net_device *dev) ...@@ -3059,7 +3059,6 @@ bool NicIFEnableNIC(struct net_device *dev)
} }
bool NicIFDisableNIC(struct net_device *dev) bool NicIFDisableNIC(struct net_device *dev)
{ {
bool status = true;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
u8 tmp_state = 0; u8 tmp_state = 0;
...@@ -3074,7 +3073,7 @@ bool NicIFDisableNIC(struct net_device *dev) ...@@ -3074,7 +3073,7 @@ bool NicIFDisableNIC(struct net_device *dev)
priv->ops->stop_adapter(dev, false); priv->ops->stop_adapter(dev, false);
RT_TRACE(COMP_PS, "<=========%s()\n", __func__); RT_TRACE(COMP_PS, "<=========%s()\n", __func__);
return status; return true;
} }
static int __init rtl8192_pci_module_init(void) static int __init rtl8192_pci_module_init(void)
......
...@@ -232,9 +232,7 @@ static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr) ...@@ -232,9 +232,7 @@ static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr)
static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee) static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
{ {
bool retValue = false; return false;
return retValue;
} }
static bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee) static bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment