[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1383007074-6491-1-git-send-email-stefano.stabellini@eu.citrix.com>
Date: Tue, 29 Oct 2013 00:37:54 +0000
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: <xen-devel@...ts.xensource.com>
CC: <linux-kernel@...r.kernel.org>, <konrad.wilk@...cle.com>,
<Stefano.Stabellini@...citrix.com>,
Stefano Stabellini <stefano.stabellini@...citrix.com>
Subject: [PATCH] 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@...citrix.com>
---
drivers/xen/swiotlb-xen.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 100962d..8af6862 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 {
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists