summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorMahati Chamarthy <mahati.chamarthy@gmail.com>2014-09-23 15:43:36 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-24 03:32:43 (GMT)
commitd8e186cebc94ac06682364b9931f38809ce7b1b5 (patch)
tree462e662b00acfb9fddbe09c67fdd0eabbfc661a4 /drivers/staging/rtl8192e
parentbfcc6be5bcf3f17a98765df5aa69d59ccf87a1bd (diff)
downloadlinux-d8e186cebc94ac06682364b9931f38809ce7b1b5.tar.xz
Staging: rtl8192e: rtl8192e: Merge two lines and remove unused variable
This patch merges an assignment with an immediately following return of the assigned variable. It also removes variables that became unused due to this transformation. The following Coccinelle semantic patch was used to make this transformation: @r@ identifier ret; identifier f; @@ -ret = +return f(...); -return ret; @@ identifier r.ret; expression e1; type t; @@ ( -t ret = e1; | -t ret; ) ... when != ret when strict Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index f1a9f1e..8c08ef6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -286,7 +286,6 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, enum rf90_radio_path eRFPath,
static u32 phy_FwRFSerialRead(struct net_device *dev,
enum rf90_radio_path eRFPath, u32 Offset)
{
- u32 retValue = 0;
u32 Data = 0;
u8 time = 0;
@@ -306,9 +305,7 @@ static u32 phy_FwRFSerialRead(struct net_device *dev,
else
return 0;
}
- retValue = read_nic_dword(dev, RF_DATA);
-
- return retValue;
+ return read_nic_dword(dev, RF_DATA);
} /* phy_FwRFSerialRead */
@@ -606,11 +603,8 @@ static bool rtl8192_BB_Config_ParaFile(struct net_device *dev)
}
bool rtl8192_BBConfig(struct net_device *dev)
{
- bool rtStatus = true;
-
rtl8192_InitBBRFRegDef(dev);
- rtStatus = rtl8192_BB_Config_ParaFile(dev);
- return rtStatus;
+ return rtl8192_BB_Config_ParaFile(dev);
}
void rtl8192_phy_getTxPower(struct net_device *dev)