aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/auerswald.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/auerswald.c')
-rw-r--r--drivers/usb/misc/auerswald.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index ad2f4cccd388..1fef36e71c57 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -570,10 +570,9 @@ static int auerchain_setup (pauerchain_t acp, unsigned int numElements)
570 570
571 /* fill the list of free elements */ 571 /* fill the list of free elements */
572 for (;numElements; numElements--) { 572 for (;numElements; numElements--) {
573 acep = (pauerchainelement_t) kmalloc (sizeof (auerchainelement_t), GFP_KERNEL); 573 acep = kzalloc(sizeof(auerchainelement_t), GFP_KERNEL);
574 if (!acep) 574 if (!acep)
575 goto ac_fail; 575 goto ac_fail;
576 memset (acep, 0, sizeof (auerchainelement_t));
577 INIT_LIST_HEAD (&acep->list); 576 INIT_LIST_HEAD (&acep->list);
578 list_add_tail (&acep->list, &acp->free_list); 577 list_add_tail (&acep->list, &acp->free_list);
579 } 578 }
@@ -761,10 +760,9 @@ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned
761 760
762 /* fill the list of free elements */ 761 /* fill the list of free elements */
763 for (;numElements; numElements--) { 762 for (;numElements; numElements--) {
764 bep = (pauerbuf_t) kmalloc (sizeof (auerbuf_t), GFP_KERNEL); 763 bep = kzalloc(sizeof(auerbuf_t), GFP_KERNEL);
765 if (!bep) 764 if (!bep)
766 goto bl_fail; 765 goto bl_fail;
767 memset (bep, 0, sizeof (auerbuf_t));
768 bep->list = bcp; 766 bep->list = bcp;
769 INIT_LIST_HEAD (&bep->buff_list); 767 INIT_LIST_HEAD (&bep->buff_list);
770 bep->bufp = kmalloc (bufsize, GFP_KERNEL); 768 bep->bufp = kmalloc (bufsize, GFP_KERNEL);