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: Liam Mark <lmark@codeaurora.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Liam Mark 2018-02-16 12:19:22 -08:00 committed by Greg Kroah-Hartman
parent 2baddf262e
commit 54ef5b9db7

View File

@ -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);
}