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

Commit 76305e44 authored by Patrick Daly's avatar Patrick Daly
Browse files

ion: Fix partial cache maintenance issue



Ensure loop indexes are incremented properly when offset is
greater than zero.

Change-Id: I23e3b90f4d5c101da30490ac992d12635095db8b
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent cdaab23e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -562,8 +562,10 @@ static int ion_sgl_sync_range(struct device *dev, struct scatterlist *sgl,
			sg_dma_addr = sg_dma_address(sg);

		len += sg->length;
		if (len <= offset)
		if (len <= offset) {
			sg_dma_addr += sg->length;
			continue;
		}

		sg_left = len - offset;
		sg_offset = sg->length - sg_left;