Skip to contentSkip to conversation

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

PATCH New Liam Mark 1 participant 1 message Feb 16, 2018 Staging

lore
Share & tools
lore

Liam Mark

author
#0 lore raw

PATCH v2 1/1 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.

---
Changes in v2:
- Add to commit message that it doesn't cause an actual bug
- Remove 'Fixes:' since it doesn't cause a bug
- Add Acked-by from Laura Abbott

 drivers/staging/android/ion/ion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion.c +1 -1
index 57e0d8035b2e..517d4f40d1b7 100644
@@ -187,7 +187,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);
 	}
 
Signature · 9 lines
1.8.5.2


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