Skip to content

Commit a5310dc

Browse files
MahatiCgregkh
authored andcommitted
Staging: rtl8192e: rtl8192e: Merges two lines of code and removes unused variable
This patch merges an assignment with an immediately following return of the assigned variable. It also removes a variable that becomes unused due to this transformation. The following Coccinelle semantic patch was used to make this transformation: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; @@ identifier ret; type t; identifier c; @@ -t ret = c; ... 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>
1 parent ca76178 commit a5310dc

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,9 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev,
8585
bool PHY_RF8256_Config(struct net_device *dev)
8686
{
8787
struct r8192_priv *priv = rtllib_priv(dev);
88-
bool rtStatus = true;
8988

9089
priv->NumTotalRFPath = RTL819X_TOTAL_RF_PATH;
91-
rtStatus = phy_RF8256_Config_ParaFile(dev);
92-
93-
return rtStatus;
90+
return phy_RF8256_Config_ParaFile(dev);
9491
}
9592

9693
bool phy_RF8256_Config_ParaFile(struct net_device *dev)

0 commit comments

Comments
 (0)