From: Liam Mark Date: Fri, 16 Feb 2018 20:19:22 +0000 (-0800) Subject: staging: android: ion: Initialize dma_address of new sg list X-Git-Tag: v4.19~1302^2~389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54ef5b9db76767e91f77b0588245e6e87d891548;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index c094be2..74d9a4e 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -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); }