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

Commit a8c645cb authored by Chintan Pandya's avatar Chintan Pandya
Browse files

dma-contiguous: Retrun 'zero' pfn in case of error



When CMA allocator gets error return from the page
allocator framework, except for the -EBUSY case, it
will bail out. Caller depends on the 'pfn' for
confirming allocation successful or not. Return 0
for those error case.

Change-Id: Ica4e04a9f9f18b1a29035ba2bae9deecfd68a5e8
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
parent de5acd14
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -627,6 +627,7 @@ unsigned long dma_alloc_from_contiguous(struct device *dev, int count,
		if (ret == 0) {
			break;
		} else if (ret != -EBUSY) {
			pfn = 0;
			clear_cma_bitmap(cma, pfn, count);
			break;
		}