staging: rtl8723bs: hal: Compress return logic
authorSimran Singhal <singhalsimran0@gmail.com>
Wed, 25 Mar 2020 21:43:12 +0000 (03:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2020 07:37:38 +0000 (08:37 +0100)
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325214312.GA1936@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c

index eb7de36..767e2a7 100644 (file)
@@ -1498,9 +1498,7 @@ s8 PHY_GetTxPowerByRate(
                return value;
        }
 
-       value = pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex];
-
-       return value;
+       return pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex];
 
 }