summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
diff options
context:
space:
mode:
authorJoe Perches2017-09-09 22:14:54 +0200
committerGreg Kroah-Hartman2017-09-17 16:35:26 +0200
commit2ef2b7c21fc8772d68369af96fe45c09c46aca30 (patch)
tree50154e84f489135288724ab80ba4bf0a4482e8f8 /drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
parentstaging: rtl8723bs: convert private allocation functions to return void * (diff)
downloadkernel-qcow2-linux-2ef2b7c21fc8772d68369af96fe45c09c46aca30.tar.gz
kernel-qcow2-linux-2ef2b7c21fc8772d68369af96fe45c09c46aca30.tar.xz
kernel-qcow2-linux-2ef2b7c21fc8772d68369af96fe45c09c46aca30.zip
staging: rtl8723bs: Remove unnecessary rtw_z?malloc casts
These functions now return void * and no longer need casts. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c')
-rw-r--r--drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index bd4352fe2de3..51d48de24a24 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -136,11 +136,9 @@ static struct ieee80211_supported_band *rtw_spt_band_alloc(
goto exit;
}
- spt_band = (struct ieee80211_supported_band *)rtw_zmalloc(
- sizeof(struct ieee80211_supported_band)
- + sizeof(struct ieee80211_channel)*n_channels
- + sizeof(struct ieee80211_rate)*n_bitrates
- );
+ spt_band = rtw_zmalloc(sizeof(struct ieee80211_supported_band) +
+ sizeof(struct ieee80211_channel) * n_channels +
+ sizeof(struct ieee80211_rate) * n_bitrates);
if (!spt_band)
goto exit;
@@ -1094,7 +1092,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
DBG_871X("pairwise =%d\n", pairwise);
param_len = sizeof(struct ieee_param) + params->key_len;
- param = (struct ieee_param *)rtw_malloc(param_len);
+ param = rtw_malloc(param_len);
if (param == NULL)
return -1;
@@ -2183,7 +2181,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, KeyMaterial);
- pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
+ pwep = rtw_malloc(wep_total_len);
if (pwep == NULL) {
DBG_871X(" wpa_set_encryption: pwep allocate fail !!!\n");
ret = -ENOMEM;
@@ -2677,7 +2675,7 @@ static int rtw_cfg80211_add_monitor_if (struct adapter *padapter, char *name, st
pnpi->sizeof_priv = sizeof(struct adapter);
/* wdev */
- mon_wdev = (struct wireless_dev *)rtw_zmalloc(sizeof(struct wireless_dev));
+ mon_wdev = rtw_zmalloc(sizeof(struct wireless_dev));
if (!mon_wdev) {
DBG_871X(FUNC_ADPT_FMT" allocate mon_wdev fail\n", FUNC_ADPT_ARG(padapter));
ret = -ENOMEM;
@@ -3497,7 +3495,7 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)
}
/* wdev */
- wdev = (struct wireless_dev *)rtw_zmalloc(sizeof(struct wireless_dev));
+ wdev = rtw_zmalloc(sizeof(struct wireless_dev));
if (!wdev) {
DBG_8192C("Couldn't allocate wireless device\n");
ret = -ENOMEM;