Commit 54ef5b9d authored by Liam Mark's avatar Liam Mark Committed by Greg Kroah-Hartman
Browse files

staging: android: ion: Initialize dma_address of new sg list



Fix the dup_sg_table function to initialize the dma_address of the new
sg list entries instead of the source dma_address entries.

Since ION duplicates the sg_list this issue does not appear to result in
an actual bug.

Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
Acked-by: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2baddf26
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ static struct sg_table *dup_sg_table(struct sg_table *table)
	new_sg = new_table->sgl;
	for_each_sg(table->sgl, sg, table->nents, i) {
		memcpy(new_sg, sg, sizeof(*sg));
		sg->dma_address = 0;
		new_sg->dma_address = 0;
		new_sg = sg_next(new_sg);
	}