]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-mem.c
Merge branch 'master' of /usr/src/ntfs-2.6/
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-mem.c
index 91c2ab43cbcc1a58412751505400e1db045f1909..766061e0260a5e96d6258149bc6f7f8a31f71ee9 100644 (file)
@@ -75,7 +75,6 @@ static void qh_destroy (struct kref *kref)
        }
        if (qh->dummy)
                ehci_qtd_free (ehci, qh->dummy);
-       usb_put_dev (qh->dev);
        dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
 }
 
@@ -221,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");