Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54ed8121 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

firmware/ivc: use dma_mapping_error



DMA_ERROR_CODE is not supposed to be used by drivers.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
parent 41f1830f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;