staging: rtl8723bs: core: Change NULL comparison to Boolean negation
authorNishka Dasgupta <nishka.dasgupta@yahoo.com>
Thu, 21 Mar 2019 18:48:46 +0000 (00:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Mar 2019 19:10:26 +0000 (20:10 +0100)
Change NULL comparison to Boolean negation. Issue found with Coccinelle
using matchnull.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ap.c

index cbbfef389874ce9c4a7f2a145ba3069b966dd350..18fabf5ff44b2c8140a64a0018c7658ec8b3dc30 100644 (file)
@@ -782,12 +782,8 @@ void start_bss_network(struct adapter *padapter, u8 *pbuf)
        /* check if there is wps ie, */
        /* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
        /* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
-       if (NULL == rtw_get_wps_ie(
-               pnetwork->IEs+_FIXED_IE_LENGTH_,
-               pnetwork->IELength-_FIXED_IE_LENGTH_,
-               NULL,
-               NULL
-       ))
+       if (!rtw_get_wps_ie(pnetwork->IEs+_FIXED_IE_LENGTH_,
+                           pnetwork->IELength-_FIXED_IE_LENGTH_, NULL, NULL))
                pmlmeext->bstart_bss = true;
 
        /* todo: update wmm, ht cap */