fi following post-commit checkpatch issues:
CHECK: Comparison to NULL could be written "!p"
290: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:978:
+ if (p == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
328: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2016:
+ if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
361: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2378:
+ if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!pmgntframe"
391: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3478:
+ if (pmgntframe == NULL)
--
CHECK: Comparison to NULL could be written "!p"
427: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4071:
+ if (p == NULL)
--
CHECK: Comparison to NULL could be written "!BIP_AAD"
781: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1690:
+ if (BIP_AAD == NULL)
--
CHECK: Comparison to NULL could be written "!pwep"
1773: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3062:
+ if (pwep == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_beacon_ie"
1784: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3510:
+ if (pmlmepriv->wps_beacon_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_resp_ie"
1795: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3544:
+ if (pmlmepriv->wps_probe_resp_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_assoc_resp_ie"
1807: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3574:
+ if (pmlmepriv->wps_assoc_resp_ie == NULL)
--
CHECK: Comparison to NULL could be written "!pbuf"
1818: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3928:
+ if (pbuf == NULL)
--
CHECK: Comparison to NULL could be written "!if1"
1944: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:392:
+ if (if1 == NULL)
CHECK: Using comparison to false is error prone
402: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3890:
+ if (false == bxmitok)
--
CHECK: Using comparison to true is error prone
671: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365:
+ if ((prxattrib->bdecrypted == true) && (brpt_micerror == true))
--
CHECK: Using comparison to true is error prone
1051: FILE: drivers/staging/rtl8723bs/core/rtw_xmit.c:1174:
+ if (padapter->securitypriv.binstallBIPkey != true)
--
CHECK: Using comparison to false is error prone
1632: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2194:
+ if (false == bMatched)
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/572f96dcb6217fd3e6ea23c37b55b0ebb3231f14.1617802415.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&len,
pkt_len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_);
- if (p == NULL)
+ if (!p)
goto authclnt_fail;
memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len);
else
pmgntframe = rtw_alloc_xmitframe_ext(pxmitpriv);
- if (pmgntframe == NULL)
+ if (!pmgntframe)
goto exit;
pxmitbuf = rtw_alloc_xmitbuf_ext(pxmitpriv);
return;
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
- if (pmgntframe == NULL)
+ if (!pmgntframe)
return;
/* update attribute */
__le16 le_tmp;
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
- if (pmgntframe == NULL)
+ if (!pmgntframe)
return;
/* update attribute */
}
- if (false == bxmitok)
+ if (!bxmitok)
return _FAIL;
else
return _SUCCESS;
/* checking SSID */
p = rtw_get_ie(bssid->IEs + ie_offset, WLAN_EID_SSID, &len, bssid->IELength - ie_offset);
- if (p == NULL)
+ if (!p)
return _FAIL;
if (*(p + 1)) {
if ((IS_MCAST(prxattrib->ra) == true) && (prxattrib->key_index != pmlmeinfo->key_index))
brpt_micerror = false;
- if ((prxattrib->bdecrypted == true) && (brpt_micerror == true))
+ if ((prxattrib->bdecrypted) && (brpt_micerror))
rtw_handle_tkip_mic_err(adapter, (u8)IS_MCAST(prxattrib->ra));
res = _FAIL;
ori_len = pattrib->pkt_len-WLAN_HDR_A3_LEN+BIP_AAD_SIZE;
BIP_AAD = rtw_zmalloc(ori_len);
- if (BIP_AAD == NULL)
+ if (!BIP_AAD)
return _FAIL;
/* PKT start */
goto xmitframe_coalesce_success;
/* IGTK key is not install, it may not support 802.11w */
- if (padapter->securitypriv.binstallBIPkey != true)
+ if (!padapter->securitypriv.binstallBIPkey)
goto xmitframe_coalesce_success;
/* station mode doesn't need TX BIP, just ready the code */
}
}
- if (false == bMatched)
+ if (!bMatched)
return -EINVAL;
return 0;
wep_key_len = wep_key_len <= 5 ? 5 : 13;
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
pwep = kzalloc(wep_total_len, GFP_KERNEL);
- if (pwep == NULL)
+ if (!pwep)
goto exit;
pwep->KeyLength = wep_key_len;
if (ie_len > 0) {
pmlmepriv->wps_beacon_ie = rtw_malloc(ie_len);
pmlmepriv->wps_beacon_ie_len = ie_len;
- if (pmlmepriv->wps_beacon_ie == NULL)
+ if (!pmlmepriv->wps_beacon_ie)
return -EINVAL;
memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len);
if (ie_len > 0) {
pmlmepriv->wps_probe_resp_ie = rtw_malloc(ie_len);
pmlmepriv->wps_probe_resp_ie_len = ie_len;
- if (pmlmepriv->wps_probe_resp_ie == NULL)
+ if (!pmlmepriv->wps_probe_resp_ie)
return -EINVAL;
memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len);
if (ie_len > 0) {
pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
pmlmepriv->wps_assoc_resp_ie_len = ie_len;
- if (pmlmepriv->wps_assoc_resp_ie == NULL)
+ if (!pmlmepriv->wps_assoc_resp_ie)
return -EINVAL;
memcpy(pmlmepriv->wps_assoc_resp_ie, param->u.bcn_ie.buf, ie_len);
len = wrqu->data.length;
pbuf = rtw_zmalloc(len);
- if (pbuf == NULL)
+ if (!pbuf)
return -ENOMEM;
if (copy_from_user(pbuf, wrqu->data.pointer, len)) {
goto exit;
if1 = rtw_sdio_if1_init(dvobj, id);
- if (if1 == NULL)
+ if (!if1)
goto free_dvobj;
/* dev_alloc_name && register_netdev */