aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2018-02-16 12:19:22 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-20 09:05:35 +0100
commit54ef5b9db76767e91f77b0588245e6e87d891548 (patch)
tree56b19ac5e335ba589b0b4c177f09e5eba365026e /drivers/staging/android
parentstaging: lustre: use memdup_user to allocate memory and copy from user (diff)
downloadlinux-dev-54ef5b9db76767e91f77b0588245e6e87d891548.tar.xz
linux-dev-54ef5b9db76767e91f77b0588245e6e87d891548.zip
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>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/ion/ion.c2
1 files changed, 1 insertions, 1 deletions
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);
}