summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_softmac.c
diff options
context:
space:
mode:
authorNavya Sri Nizamkari2015-03-10 13:28:07 +0100
committerGreg Kroah-Hartman2015-03-15 18:41:09 +0100
commitd272f9ddce1b77271e3ab449c99257b3fc1fb3be (patch)
treea3065a1e572d8209368611edc75489e9c0c0848f /drivers/staging/rtl8192e/rtllib_softmac.c
parentstaging: rtl8188eu: Use kcalloc instead of kzalloc. (diff)
downloadkernel-qcow2-linux-d272f9ddce1b77271e3ab449c99257b3fc1fb3be.tar.gz
kernel-qcow2-linux-d272f9ddce1b77271e3ab449c99257b3fc1fb3be.tar.xz
kernel-qcow2-linux-d272f9ddce1b77271e3ab449c99257b3fc1fb3be.zip
staging: rtl8192e: Use kzalloc instead of kmalloc.
This patch uses kzalloc instead of kmalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_softmac.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 16aef7cf23b9..c246ef40c69e 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -3421,12 +3421,11 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt);
- new_crypt = kmalloc(sizeof(*new_crypt), GFP_KERNEL);
+ new_crypt = kzalloc(sizeof(*new_crypt), GFP_KERNEL);
if (new_crypt == NULL) {
ret = -ENOMEM;
goto done;
}
- memset(new_crypt, 0, sizeof(struct lib80211_crypt_data));
new_crypt->ops = ops;
if (new_crypt->ops)
new_crypt->priv =