summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-mem.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 21:29:43 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 14:49:59 -0800
commit80b6ca48321974a6566a1c9048ba34f60420bca6 (patch)
treea350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/host/ehci-mem.c
parentd54a5cb6484705f7808b337917cc7598f2f971c3 (diff)
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-mem.c')
-rw-r--r--drivers/usb/host/ehci-mem.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
index ec7eb3f4f867..766061e0260a 100644
--- a/drivers/usb/host/ehci-mem.c
+++ b/drivers/usb/host/ehci-mem.c
@@ -220,13 +220,9 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
ehci->periodic [i] = EHCI_LIST_END;
/* software shadow of hardware table */
- ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), flags);
- if (ehci->pshadow == NULL) {
- goto fail;
- }
- memset (ehci->pshadow, 0, ehci->periodic_size * sizeof (void *));
-
- return 0;
+ ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags);
+ if (ehci->pshadow != NULL)
+ return 0;
fail:
ehci_dbg (ehci, "couldn't init memory\n");