aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/whci/qset.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-02-05 19:31:48 +0000
committerMark Brown <broonie@kernel.org>2016-02-05 19:31:48 +0000
commit130faf3765d29c961be74f7245eb504a414a68e2 (patch)
treedf25d9b427876e1b95a3ff8e9f38dddcfce26610 /drivers/usb/host/whci/qset.c
parentf90ae1b62bedd8b57966a7be68855f2d43170db6 (diff)
parent707e840c5e24bb2df1ea4e753964275e257ec816 (diff)
Merge tag 'v3.18.26' into linux-linaro-lsk-v3.18lsk-v3.18-16.02
Linux 3.18.26 # gpg: Signature made Mon 25 Jan 2016 15:06:44 GMT using RSA key ID 97772CDC # gpg: requesting key 97772CDC from hkp server the.earth.li # gpg: key 97772CDC: public key "Sasha Levin <sasha.levin@oracle.com>" imported # gpg: no ultimately trusted keys found # gpg: Total number processed: 1 # gpg: imported: 1 (RSA: 1) # gpg: Good signature from "Sasha Levin <sasha.levin@oracle.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: E27E 5D8A 3403 A2EF 6687 3BBC DEA6 6FF7 9777 2CDC
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 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);