diff options
author | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 05:02:08 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 05:02:08 -0500 |
commit | 5501972e0b5857bc8354770d900ceb9b40c7f6b7 (patch) | |
tree | ff239422827c4cd54d2998f8851304255de31b38 /drivers/usb/host/ehci-mem.c | |
parent | 9d2f928ddf64ca0361562e30faf584cd33055c60 (diff) | |
parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/usb/host/ehci-mem.c')
-rw-r--r-- | drivers/usb/host/ehci-mem.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c index 91c2ab43cbcc..766061e0260a 100644 --- a/drivers/usb/host/ehci-mem.c +++ b/drivers/usb/host/ehci-mem.c | |||
@@ -75,7 +75,6 @@ static void qh_destroy (struct kref *kref) | |||
75 | } | 75 | } |
76 | if (qh->dummy) | 76 | if (qh->dummy) |
77 | ehci_qtd_free (ehci, qh->dummy); | 77 | ehci_qtd_free (ehci, qh->dummy); |
78 | usb_put_dev (qh->dev); | ||
79 | dma_pool_free (ehci->qh_pool, qh, qh->qh_dma); | 78 | dma_pool_free (ehci->qh_pool, qh, qh->qh_dma); |
80 | } | 79 | } |
81 | 80 | ||
@@ -221,13 +220,9 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) | |||
221 | ehci->periodic [i] = EHCI_LIST_END; | 220 | ehci->periodic [i] = EHCI_LIST_END; |
222 | 221 | ||
223 | /* software shadow of hardware table */ | 222 | /* software shadow of hardware table */ |
224 | ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), flags); | 223 | ehci->pshadow = kcalloc(ehci->periodic_size, sizeof(void *), flags); |
225 | if (ehci->pshadow == NULL) { | 224 | if (ehci->pshadow != NULL) |
226 | goto fail; | 225 | return 0; |
227 | } | ||
228 | memset (ehci->pshadow, 0, ehci->periodic_size * sizeof (void *)); | ||
229 | |||
230 | return 0; | ||
231 | 226 | ||
232 | fail: | 227 | fail: |
233 | ehci_dbg (ehci, "couldn't init memory\n"); | 228 | ehci_dbg (ehci, "couldn't init memory\n"); |