Commit 15177608 authored by Stefano Stabellini's avatar Stefano Stabellini

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: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
parent 6b42a7ea
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment