summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-10-29 01:37:37 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-10-29 01:37:37 +0100
commit15177608c703e7b4aa29aa7c93b31001effe504c (patch)
tree2079dbb9b9298bf1e2d25473b182e4ca4dd46de5 /drivers/xen
parentswiotlb-xen: static inline xen_phys_to_bus, xen_bus_to_phys, xen_virt_to_bus ... (diff)
downloadlinux-15177608c703e7b4aa29aa7c93b31001effe504c.tar.xz
linux-15177608c703e7b4aa29aa7c93b31001effe504c.zip
swiotlb-xen: fix error code returned by xen_swiotlb_map_sg_attrs
map_sg returns the number of elements mapped, not a dma_addr_t. In case of error return 0, not DMA_ERROR_CODE. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/swiotlb-xen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 100962dcc7bb..8af68629260b 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -548,7 +548,7 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
xen_swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir,
attrs);
sg_dma_len(sgl) = 0;
- return DMA_ERROR_CODE;
+ return 0;
}
sg->dma_address = xen_phys_to_bus(map);
} else {