staging: rtl8723bs: remove conversion to bool in halbtcoutsrc_Get()
authorJason Yan <yanaijie@huawei.com>
Mon, 4 May 2020 11:32:51 +0000 (19:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 May 2020 10:28:58 +0000 (12:28 +0200)
Fix the following coccicheck warning:

drivers/staging/rtl8723bs/hal/hal_btcoex.c:410:59-64: WARNING:
conversion to bool not needed here

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20200504113251.40791-1-yanaijie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_btcoex.c

index a6ed1bb9945ea1ff6e4c143c89af4bdc37989c79..3705a60a0546219663d7a55dcca17caccf094a35 100644 (file)
@@ -407,7 +407,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
                break;
 
        case BTC_GET_BL_WIFI_ENABLE_ENCRYPTION:
-               *pu8 = padapter->securitypriv.dot11PrivacyAlgrthm == 0 ? false : true;
+               *pu8 = padapter->securitypriv.dot11PrivacyAlgrthm != 0;
                break;
 
        case BTC_GET_BL_WIFI_UNDER_B_MODE: