提交 54ed8121 编写于 作者: C Christoph Hellwig

firmware/ivc: use dma_mapping_error

DMA_ERROR_CODE is not supposed to be used by drivers.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NThierry Reding <treding@nvidia.com>
上级 41f1830f
...@@ -646,12 +646,12 @@ int tegra_ivc_init(struct tegra_ivc *ivc, struct device *peer, void *rx, ...@@ -646,12 +646,12 @@ int tegra_ivc_init(struct tegra_ivc *ivc, struct device *peer, void *rx,
if (peer) { if (peer) {
ivc->rx.phys = dma_map_single(peer, rx, queue_size, ivc->rx.phys = dma_map_single(peer, rx, queue_size,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
if (ivc->rx.phys == DMA_ERROR_CODE) if (dma_mapping_error(peer, ivc->rx.phys))
return -ENOMEM; return -ENOMEM;
ivc->tx.phys = dma_map_single(peer, tx, queue_size, ivc->tx.phys = dma_map_single(peer, tx, queue_size,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
if (ivc->tx.phys == DMA_ERROR_CODE) { if (dma_mapping_error(peer, ivc->tx.phys)) {
dma_unmap_single(peer, ivc->rx.phys, queue_size, dma_unmap_single(peer, ivc->rx.phys, queue_size,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册