summaryrefslogtreecommitdiff
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorTapasweni Pathak <tapaswenipathak@gmail.com>2014-10-08 23:33:40 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-20 10:29:19 +0800
commitad96f37f06596c6a7bd4dae3cf364bbb4ab7d7a4 (patch)
treef7019c77138b9cbbda57bc7e74bbbdfc09a51ce1 /drivers/staging/wlan-ng
parent646da830fd61a74947581b3675e1919361f16cd2 (diff)
staging: wlan-ng: replace kmalloc and memset with kzalloc
Replace kmalloc and memset with a single call of kzalloc in file of wlan-ng. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/prism2fw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index 6c38f797d1ab..e907380f9163 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -986,8 +986,8 @@ static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk,
u32 currlen;
u32 currdaddr;
- rstmsg = kmalloc(sizeof(*rstmsg), GFP_KERNEL);
- rwrmsg = kmalloc(sizeof(*rwrmsg), GFP_KERNEL);
+ rstmsg = kzalloc(sizeof(*rstmsg), GFP_KERNEL);
+ rwrmsg = kzalloc(sizeof(*rwrmsg), GFP_KERNEL);
if (!rstmsg || !rwrmsg) {
kfree(rstmsg);
kfree(rwrmsg);
@@ -997,7 +997,6 @@ static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk,
}
/* Initialize the messages */
- memset(rstmsg, 0, sizeof(*rstmsg));
strcpy(rstmsg->devname, wlandev->name);
rstmsg->msgcode = DIDmsg_p2req_ramdl_state;
rstmsg->msglen = sizeof(*rstmsg);
@@ -1011,7 +1010,6 @@ static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk,
rstmsg->exeaddr.len = sizeof(u32);
rstmsg->resultcode.len = sizeof(u32);
- memset(rwrmsg, 0, sizeof(*rwrmsg));
strcpy(rwrmsg->devname, wlandev->name);
rwrmsg->msgcode = DIDmsg_p2req_ramdl_write;
rwrmsg->msglen = sizeof(*rwrmsg);