[PATCH] libertas: changed some occurences of kmalloc() + memset(&a,0,sz) to kzalloc()
The subject says it all.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c
index 86c652d..2c965b5 100644
--- a/drivers/net/wireless/libertas/fw.c
+++ b/drivers/net/wireless/libertas/fw.c
@@ -139,13 +139,11 @@
/* Allocate buffer to store the BSSID list */
ulbufsize = sizeof(struct bss_descriptor) * MRVDRV_MAX_BSSID_LIST;
- if (!(ptempscantable = kmalloc(ulbufsize, GFP_KERNEL))) {
+ if (!(ptempscantable = kzalloc(ulbufsize, GFP_KERNEL))) {
libertas_free_adapter(priv);
return -1;
}
-
adapter->scantable = ptempscantable;
- memset(adapter->scantable, 0, ulbufsize);
/* Allocate the command buffers */
libertas_allocate_cmd_buffer(priv);