aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-mem.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-27 15:29:43 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:59 -0500
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)
220 ehci->periodic [i] = EHCI_LIST_END; 220 ehci->periodic [i] = EHCI_LIST_END;
221 221
222 /* software shadow of hardware table */ 222 /* software shadow of hardware table */
223 ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), flags); 223 ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags);
224 if (ehci->pshadow == NULL) { 224 if (ehci->pshadow != NULL)
225 goto fail; 225 return 0;
226 }
227 memset (ehci->pshadow, 0, ehci->periodic_size * sizeof (void *));
228
229 return 0;
230 226
231fail: 227fail:
232 ehci_dbg (ehci, "couldn't init memory\n"); 228 ehci_dbg (ehci, "couldn't init memory\n");