staging: rtl8723bs: fix comparsion to NULL - coding style
authorMichael Straube <straube.linux@gmail.com>
Wed, 27 Jun 2018 17:36:46 +0000 (19:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 13:46:01 +0000 (22:46 +0900)
Fix comparsion to NULL issues found by checkpatch.
Use !x instead of x == NULL.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ieee80211.c

index 0822e440204e4550c4dee5f4f02b8ccfe9da782a..e5589563292165b920fc4b89c2d8a96e9790802a 100644 (file)
@@ -747,7 +747,7 @@ u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
        u8 match = false;
        u8 eid, wps_oui[4] = {0x0, 0x50, 0xf2, 0x04};
 
-       if (ie_ptr == NULL)
+       if (!ie_ptr)
                return match;
 
        eid = ie_ptr[0];
@@ -1163,7 +1163,7 @@ void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr)
        const unsigned char *addr;
        int len;
 
-       if (mac_addr == NULL)
+       if (!mac_addr)
                return;
 
        if (rtw_initmac) {      /*      Users specify the mac address */