diff options
author | Simran Singhal <singhalsimran0@gmail.com> | 2020-03-26 03:13:12 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-26 08:37:38 +0100 |
commit | ecc11b42c79db41b45fe6f8db46ae8ca54cf126a (patch) | |
tree | 7ac7c157733f48f701c2038ae19fc309a1983e0e /drivers/staging | |
parent | 1b590af9fa2d7d8407c4e780eb506d536157d36b (diff) | |
download | lwn-ecc11b42c79db41b45fe6f8db46ae8ca54cf126a.tar.gz lwn-ecc11b42c79db41b45fe6f8db46ae8ca54cf126a.zip |
staging: rtl8723bs: hal: Compress return logic
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index eb7de3617d83..767e2a784f78 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -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]; } |