OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41f1830
)
firmware/ivc: use dma_mapping_error
author
Christoph Hellwig
<hch@lst.de>
Sun, 21 May 2017 10:33:39 +0000
(12:33 +0200)
committer
Christoph Hellwig
<hch@lst.de>
Tue, 20 Jun 2017 09:12:54 +0000
(11:12 +0200)
DMA_ERROR_CODE is not supposed to be used by drivers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Thierry Reding <treding@nvidia.com>
drivers/firmware/tegra/ivc.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/tegra/ivc.c
b/drivers/firmware/tegra/ivc.c
index
29ecfd8
..
a01461d
100644
(file)
--- a/
drivers/firmware/tegra/ivc.c
+++ b/
drivers/firmware/tegra/ivc.c
@@
-646,12
+646,12
@@
int tegra_ivc_init(struct tegra_ivc *ivc, struct device *peer, void *rx,
if (peer) {
ivc->rx.phys = dma_map_single(peer, rx, queue_size,
DMA_BIDIRECTIONAL);
- if (
ivc->rx.phys == DMA_ERROR_CODE
)
+ if (
dma_mapping_error(peer, ivc->rx.phys)
)
return -ENOMEM;
ivc->tx.phys = dma_map_single(peer, tx, queue_size,
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_BIDIRECTIONAL);
return -ENOMEM;