OSDN Git Service

staging: rtl8723bs: simplify if else statement
authorMichael Straube <straube.linux@gmail.com>
Sat, 30 Jun 2018 11:36:28 +0000 (13:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Jul 2018 08:43:10 +0000 (10:43 +0200)
Simplify if else statement to a single function call
by passing the variable.

Suggested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_btcoex.c

index e56502e..35310e8 100644 (file)
@@ -115,11 +115,7 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter)
 
 void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)
 {
-       if (true == manual) {
-               hal_btcoex_SetManualControl(padapter, true);
-       } else{
-               hal_btcoex_SetManualControl(padapter, false);
-       }
+       hal_btcoex_SetManualControl(padapter, manual);
 }
 
 u8 rtw_btcoex_IsBtControlLps(struct adapter *padapter)