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

Commit ff6363d8 authored by Chintan Pandya's avatar Chintan Pandya Committed by Susheel Khiani
Browse files

dma-contiguous: Re-order the error handling sequence



When CMA allocation fails because of any pending
signals, we clear off pfn and bit map before
returning back. While clearing off the bitmap,
we still use the pfn info so, clear pfn only
after bitmap is cleared.

CRs-fixed: 772299
Change-Id: I94e566181f75b7c8ebdab7d29437e5fca5f3fbdc
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
Signed-off-by: default avatarSusheel Khiani <skhiani@codeaurora.org>
parent ee424606
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -637,8 +637,8 @@ 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);
			pfn = 0;
			break;
		}
		clear_cma_bitmap(cma, pfn, count);