[PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page
From: Frediano Ziglio
Date: Thu Nov 06 2014 - 12:08:13 EST
On ARM error code is not 0 so avoid to return it as error.
Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxxx>
---
drivers/xen/swiotlb-xen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index ebd8f21..3b8d628 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
*/
if (!dma_capable(dev, dev_addr, size)) {
swiotlb_tbl_unmap_single(dev, map, size, dir);
- dev_addr = 0;
+ dev_addr = DMA_ERROR_CODE;
}
return dev_addr;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/