summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/whci/qset.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 04:20:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-14 04:20:27 +0100
commit252ca494ac75f0dc47469f130d6dc67ed14081f4 (patch)
tree159e9931af199f8acf50f9982f281ee69ceb7cbf /drivers/usb/host/whci/qset.c
parentusb: ehci: ohci: fix bool assignments (diff)
parentLinux 4.4-rc5 (diff)
downloadlinux-252ca494ac75f0dc47469f130d6dc67ed14081f4.tar.xz
linux-252ca494ac75f0dc47469f130d6dc67ed14081f4.zip
Merge 4.4-rc5 into usb-next as we want those fixes here for testing
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/whci/qset.c')
-rw-r--r--drivers/usb/host/whci/qset.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/whci/qset.c b/drivers/usb/host/whci/qset.c
index 5e48a605c71e..1a8e960d073b 100644
--- a/drivers/usb/host/whci/qset.c
+++ b/drivers/usb/host/whci/qset.c
@@ -376,6 +376,10 @@ static int qset_fill_page_list(struct whc *whc, struct whc_std *std, gfp_t mem_f
if (std->pl_virt == NULL)
return -ENOMEM;
std->dma_addr = dma_map_single(whc->wusbhc.dev, std->pl_virt, pl_len, DMA_TO_DEVICE);
+ if (dma_mapping_error(whc->wusbhc.dev, std->dma_addr)) {
+ kfree(std->pl_virt);
+ return -EFAULT;
+ }
for (p = 0; p < std->num_pointers; p++) {
std->pl_virt[p].buf_ptr = cpu_to_le64(dma_addr);