diff options
author | Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 2015-02-20 17:14:30 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-26 23:12:10 (GMT) |
commit | d0049dfc88d18657da302023782473b615f3fcf4 (patch) | |
tree | 7f219069ae4987335635bb341446b5102e7dcebb /drivers/staging/rtl8192u/r819xU_phy.c | |
parent | 1f3aefb5dfcaf28c0a0b5c270ca120818da88f58 (diff) | |
download | linux-d0049dfc88d18657da302023782473b615f3fcf4.tar.xz |
Staging: rtl8192: Simplifying if-else statement
This patch simplifies the code by not having two identical paths and
fixes the warning given by checkpatch.pl: "else is not useful after
a break or return".
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r819xU_phy.c')
-rw-r--r-- | drivers/staging/rtl8192u/r819xU_phy.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 3b2c954..c8dc648 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -352,16 +352,14 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath, return 0; if (priv->Rf_Mode == RF_OP_By_FW) { reg = phy_FwRFSerialRead(dev, eRFPath, reg_addr); - bitshift = rtl8192_CalculateBitShift(bitmask); - reg = (reg & bitmask) >> bitshift; udelay(200); - return reg; } else { reg = rtl8192_phy_RFSerialRead(dev, eRFPath, reg_addr); - bitshift = rtl8192_CalculateBitShift(bitmask); - reg = (reg & bitmask) >> bitshift; - return reg; } + bitshift = rtl8192_CalculateBitShift(bitmask); + reg = (reg & bitmask) >> bitshift; + return reg; + } /****************************************************************************** |