diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-14 06:20:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-14 06:20:27 +0300 |
commit | 252ca494ac75f0dc47469f130d6dc67ed14081f4 (patch) | |
tree | 159e9931af199f8acf50f9982f281ee69ceb7cbf /drivers/usb/host/whci | |
parent | 900937c0375efcbb2c9fb2eef50ccb5c98fc99ea (diff) | |
parent | 9f9499ae8e6415cefc4fe0a96ad0e27864353c89 (diff) | |
download | linux-252ca494ac75f0dc47469f130d6dc67ed14081f4.tar.xz |
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')
-rw-r--r-- | drivers/usb/host/whci/qset.c | 4 |
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); |