From 54ef5b9db76767e91f77b0588245e6e87d891548 Mon Sep 17 00:00:00 2001 From: Liam Mark Date: Fri, 16 Feb 2018 12:19:22 -0800 Subject: 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 --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/android') diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index c094be2f15b2..74d9a4e29b2b 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); } -- cgit v1.2.3-59-g8ed1b