staging: rtl8188eu: core: removed comparison to NULL
authorJuliana Rodrigues <juliana.orod@gmail.com>
Wed, 10 May 2017 02:20:10 +0000 (23:20 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 05:43:52 +0000 (07:43 +0200)
Removed comparison to NULL fixing checkpatch issues.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ap.c

index 519b4d3..909406b 100644 (file)
@@ -991,7 +991,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
                        }
                        break;
                }
-               if ((p == NULL) || (ie_len == 0))
+               if ((!p) || (ie_len == 0))
                        break;
        }
 
@@ -1015,7 +1015,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
                                break;
                        }
 
-                       if ((p == NULL) || (ie_len == 0))
+                       if ((!p) || (ie_len == 0))
                                break;
                }
        }
@@ -1097,7 +1097,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
        psta = rtw_get_stainfo(&padapter->stapriv, pbss_network->MacAddress);
        if (!psta) {
                psta = rtw_alloc_stainfo(&padapter->stapriv, pbss_network->MacAddress);
-               if (psta == NULL)
+               if (!psta)
                        return _FAIL;
        }
 
@@ -1268,12 +1268,12 @@ static void update_bcn_wps_ie(struct adapter *padapter)
        DBG_88E("%s\n", __func__);
 
        pwps_ie_src = pmlmepriv->wps_beacon_ie;
-       if (pwps_ie_src == NULL)
+       if (!pwps_ie_src)
                return;
 
        pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
 
-       if (pwps_ie == NULL || wps_ielen == 0)
+       if (!pwps_ie || wps_ielen == 0)
                return;
 
        wps_offset = (uint)(pwps_ie-ie);