* [PATCH] staging: rtl8723bs: os_dep: Make use rtw_zmalloc
@ 2019-06-16 5:16 Hariprasad Kelam
2019-06-18 6:59 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-06-16 5:16 UTC (permalink / raw)
To: Greg Kroah-Hartman, Hariprasad Kelam, Jeeeun Evans, Larry Finger,
Quytelda Kahja, Omer Efrat, Arnd Bergmann, Puranjay Mohan, devel,
linux-kernel
rtw_malloc with memset can be replaced with rtw_zmalloc.
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 9bc6856..aa7cc50 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1078,12 +1078,10 @@ 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 = rtw_malloc(param_len);
+ param = rtw_zmalloc(param_len);
if (param == NULL)
return -1;
- memset(param, 0, param_len);
-
param->cmd = IEEE_CMD_SET_ENCRYPTION;
memset(param->sta_addr, 0xff, ETH_ALEN);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723bs: os_dep: Make use rtw_zmalloc
2019-06-16 5:16 [PATCH] staging: rtl8723bs: os_dep: Make use rtw_zmalloc Hariprasad Kelam
@ 2019-06-18 6:59 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-18 6:59 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: Jeeeun Evans, Larry Finger, Quytelda Kahja, Omer Efrat,
Arnd Bergmann, Puranjay Mohan, devel, linux-kernel
On Sun, Jun 16, 2019 at 10:46:19AM +0530, Hariprasad Kelam wrote:
> rtw_malloc with memset can be replaced with rtw_zmalloc.
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index 9bc6856..aa7cc50 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -1078,12 +1078,10 @@ 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 = rtw_malloc(param_len);
> + param = rtw_zmalloc(param_len);
No, please call the "real" kernel function instead.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-18 6:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16 5:16 [PATCH] staging: rtl8723bs: os_dep: Make use rtw_zmalloc Hariprasad Kelam
2019-06-18 6:59 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.