diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-01-10 16:53:55 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-01-10 16:53:55 +0100 |
commit | 8b63b6bfc1a551acf154061699028c7032d7890c (patch) | |
tree | 16882e9bc9e35eacb870a6d8a71617e579c4ffdc /drivers/usb/host/whci/qset.c | |
parent | libnvdimm: fix namespace object confusion in is_uuid_busy() (diff) | |
parent | block: kill disk_{check|set|clear|alloc}_badblocks (diff) | |
download | linux-8b63b6bfc1a551acf154061699028c7032d7890c.tar.xz linux-8b63b6bfc1a551acf154061699028c7032d7890c.zip |
Merge branch 'for-4.5/block-dax' into for-4.5/libnvdimm
Diffstat (limited to 'drivers/usb/host/whci/qset.c')
-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 dc31c425ce01..9f1c0538b211 100644 --- a/drivers/usb/host/whci/qset.c +++ b/drivers/usb/host/whci/qset.c @@ -377,6 +377,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); |