aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/hcd.c5
-rw-r--r--drivers/usb/host/ehci-hcd.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 0358c05e6e8a..c5753c797735 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1218,6 +1218,11 @@ static int hcd_alloc_coherent(struct usb_bus *bus,
1218{ 1218{
1219 unsigned char *vaddr; 1219 unsigned char *vaddr;
1220 1220
1221 if (*vaddr_handle == NULL) {
1222 WARN_ON_ONCE(1);
1223 return -EFAULT;
1224 }
1225
1221 vaddr = hcd_buffer_alloc(bus, size + sizeof(vaddr), 1226 vaddr = hcd_buffer_alloc(bus, size + sizeof(vaddr),
1222 mem_flags, dma_handle); 1227 mem_flags, dma_handle);
1223 if (!vaddr) 1228 if (!vaddr)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 2a19336c9824..2e704fa3cedf 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -629,7 +629,8 @@ static int ehci_init(struct usb_hcd *hcd)
629 ehci->command = temp; 629 ehci->command = temp;
630 630
631 /* Accept arbitrarily long scatter-gather lists */ 631 /* Accept arbitrarily long scatter-gather lists */
632 hcd->self.sg_tablesize = ~0; 632 if (!(hcd->driver->flags & HCD_LOCAL_MEM))
633 hcd->self.sg_tablesize = ~0;
633 return 0; 634 return 0;
634} 635}
635 636