mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
6b42a7eafb
commit
15177608c7
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue