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

Commit 538c29d4 authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Ingo Molnar
Browse files

Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE



Don't rewrite successfull allocation return values
in case the memory was marked with DMA_MEMORY_EXCLUSIVE.

Signed-off-by: default avatarDmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f6dc8cca
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -105,8 +105,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
			*dma_handle = mem->device_base + (page << PAGE_SHIFT);
			*ret = mem->virt_base + (page << PAGE_SHIFT);
			memset(*ret, 0, size);
		}
		if (mem->flags & DMA_MEMORY_EXCLUSIVE)
		} else if (mem->flags & DMA_MEMORY_EXCLUSIVE)
			*ret = NULL;
	}
	return (mem != NULL);