diff options
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_ioctl_linux.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index df6ae855f3c1..cbaa7a489748 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -481,11 +481,11 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie, int group_cipher = 0, pairwise_cipher = 0; int ret = 0; - if ((ielen > MAX_WPA_IE_LEN) || (pie == NULL)) + if (ielen > MAX_WPA_IE_LEN || !pie) return -EINVAL; if (ielen) { buf = kmemdup(pie, ielen, GFP_ATOMIC); - if (buf == NULL) + if (!buf) return -ENOMEM; if (ielen < RSN_HEADER_LEN) { ret = -EINVAL; @@ -777,7 +777,7 @@ static int r871x_wx_set_pmkid(struct net_device *dev, * If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to * remove a PMKID/BSSID from driver. */ - if (pPMK == NULL) + if (!pPMK) return -EINVAL; memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); switch (pPMK->cmd) { @@ -1099,7 +1099,7 @@ static int r871x_wx_set_mlme(struct net_device *dev, struct _adapter *padapter = netdev_priv(dev); struct iw_mlme *mlme = (struct iw_mlme *) extra; - if (mlme == NULL) + if (!mlme) return -1; switch (mlme->cmd) { case IW_MLME_DEAUTH: @@ -1950,7 +1950,7 @@ static int r871x_get_ap_info(struct net_device *dev, u8 bssid[ETH_ALEN]; char data[33]; - if (padapter->driver_stopped || (pdata == NULL)) + if (padapter->driver_stopped || !pdata) return -EINVAL; while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) { @@ -2014,7 +2014,7 @@ static int r871x_set_pid(struct net_device *dev, struct _adapter *padapter = netdev_priv(dev); struct iw_point *pdata = &wrqu->data; - if ((padapter->driver_stopped) || (pdata == NULL)) + if (padapter->driver_stopped || !pdata) return -EINVAL; if (copy_from_user(&padapter->pid, pdata->pointer, sizeof(int))) return -EINVAL; @@ -2030,7 +2030,7 @@ static int r871x_set_chplan(struct net_device *dev, struct iw_point *pdata = &wrqu->data; int ch_plan = -1; - if ((padapter->driver_stopped) || (pdata == NULL)) { + if (padapter->driver_stopped || !pdata) { ret = -EINVAL; goto exit; } @@ -2050,7 +2050,7 @@ static int r871x_wps_start(struct net_device *dev, struct iw_point *pdata = &wrqu->data; u32 u32wps_start = 0; - if ((padapter->driver_stopped) || (pdata == NULL)) + if (padapter->driver_stopped || !pdata) return -EINVAL; if (copy_from_user((void *)&u32wps_start, pdata->pointer, 4)) return -EFAULT; |