All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: android: ion: Initialize dma_address of new sg list
@ 2018-02-10  6:16 Liam Mark
  2018-02-12  6:56 ` Dan Carpenter
  2018-02-16 16:23 ` Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: Liam Mark @ 2018-02-10  6:16 UTC (permalink / raw)
  To: Laura Abbott, Sumit Semwal; +Cc: devel, linaro-mm-sig, linux-kernel

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

Fixes: 17fd283f3870 ("staging: android: ion: Duplicate sg_table")
Signed-off-by: Liam Mark <lmark@codeaurora.org>
---
 drivers/staging/android/ion/ion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index f480885e346b..3ace3a0d9210 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -197,7 +197,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);
 	}
 
-- 
1.8.5.2


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-02-16 18:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-10  6:16 [PATCH] staging: android: ion: Initialize dma_address of new sg list Liam Mark
2018-02-12  6:56 ` Dan Carpenter
2018-02-12 21:25   ` Liam Mark
2018-02-15 23:31     ` Laura Abbott
2018-02-16 17:45       ` Liam Mark
2018-02-16 16:23 ` Greg KH
2018-02-16 17:57   ` Liam Mark
2018-02-16 18:50     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.