diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index 499ac3a77512..0868f56e2979 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -47,7 +47,7 @@ static const u32 rtw_cipher_suites[] = { * Moreover wowlan has to be enabled via a the nl80211_set_wowlan callback. * (from user space, e.g. iw phy0 wowlan enable) */ -static const struct wiphy_wowlan_support wowlan_stub = { +static __maybe_unused const struct wiphy_wowlan_support wowlan_stub = { .flags = WIPHY_WOWLAN_ANY, .n_patterns = 0, .pattern_max_len = 0, @@ -391,7 +391,7 @@ void rtw_cfg80211_ibss_indicate_connect(struct adapter *padapter) } else { - if (scanned == NULL) { + if (!scanned) { rtw_warn_on(1); return; } @@ -432,7 +432,7 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter) struct wlan_bssid_ex *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network); struct wlan_network *scanned = pmlmepriv->cur_network_scanned; - if (scanned == NULL) { + if (!scanned) { rtw_warn_on(1); goto check_bss; } @@ -551,10 +551,10 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa goto exit; } - if (strcmp(param->u.crypt.alg, "none") == 0 && (psta == NULL)) + if (strcmp(param->u.crypt.alg, "none") == 0 && !psta) goto exit; - if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta == NULL)) + if (strcmp(param->u.crypt.alg, "WEP") == 0 && !psta) { wep_key_idx = param->u.crypt.idx; wep_key_len = param->u.crypt.key_len; @@ -907,7 +907,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param } pbcmc_sta = rtw_get_bcmc_stainfo(padapter); - if (pbcmc_sta == NULL) + if (!pbcmc_sta) { /* DEBUG_ERR(("Set OID_802_11_ADD_KEY: bcmc stainfo is null\n")); */ } @@ -947,7 +947,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, param_len = sizeof(struct ieee_param) + params->key_len; param = rtw_malloc(param_len); - if (param == NULL) + if (!param) return -1; memset(param, 0, param_len); @@ -1098,7 +1098,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, } psta = rtw_get_stainfo(pstapriv, (u8 *)mac); - if (psta == NULL) { + if (!psta) { ret = -ENOENT; goto exit; } @@ -1327,7 +1327,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy struct rtw_wdev_priv *pwdev_priv; struct mlme_priv *pmlmepriv; - if (ndev == NULL) { + if (!ndev) { ret = -EINVAL; goto exit; } @@ -1571,7 +1571,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel u8 *pwpa, *pwpa2; u8 null_addr[] = {0, 0, 0, 0, 0, 0}; - if (pie == NULL || !ielen) { + if (!pie || !ielen) { /* Treat this as normal case, but need to clear WIFI_UNDER_WPS */ _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS); goto exit; @@ -1583,7 +1583,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel } buf = rtw_zmalloc(ielen); - if (buf == NULL) { + if (!buf) { ret = -ENOMEM; goto exit; } @@ -1873,7 +1873,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, wep_key_len = wep_key_len <= 5 ? 5 : 13; wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material); pwep = rtw_malloc(wep_total_len); - if (pwep == NULL) { + if (!pwep) { ret = -ENOMEM; goto exit; } @@ -2708,7 +2708,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct adapter *padapter; struct rtw_wdev_priv *pwdev_priv; - if (ndev == NULL) { + if (!ndev) { ret = -EINVAL; goto exit; } |