- ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags);
- if (ehci->pshadow != NULL)
- return 0;
+ 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;