summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/ion/ion_chunk_heap.c
diff options
context:
space:
mode:
authorGioh Kim2014-04-25 01:24:24 +0200
committerGreg Kroah-Hartman2014-04-26 00:17:31 +0200
commitb6152016003b2cc2370899558bf2e7de4ebd0b09 (patch)
tree388c2f2bac4062897f3786c79e2857455da0b5b7 /drivers/staging/android/ion/ion_chunk_heap.c
parentstaging/android: Remove ram_console.h (diff)
downloadkernel-qcow2-linux-b6152016003b2cc2370899558bf2e7de4ebd0b09.tar.gz
kernel-qcow2-linux-b6152016003b2cc2370899558bf2e7de4ebd0b09.tar.xz
kernel-qcow2-linux-b6152016003b2cc2370899558bf2e7de4ebd0b09.zip
Staging: android: ion: duplicated clearing of sg_table
Because sg_table is cleared in sg_alloc_table via memset we don't need to use kzalloc to allocate sg_table. Signed-off-by: Gioh Kim <gioh.kim@lge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion/ion_chunk_heap.c')
-rw-r--r--drivers/staging/android/ion/ion_chunk_heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c
index d40f5f831808..3f2c12ba4d14 100644
--- a/drivers/staging/android/ion/ion_chunk_heap.c
+++ b/drivers/staging/android/ion/ion_chunk_heap.c
@@ -55,7 +55,7 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap,
if (allocated_size > chunk_heap->size - chunk_heap->allocated)
return -ENOMEM;
- table = kzalloc(sizeof(struct sg_table), GFP_KERNEL);
+ table = kmalloc(sizeof(struct sg_table), GFP_KERNEL);
if (!table)
return -ENOMEM;
ret = sg_alloc_table(table, num_chunks, GFP_KERNEL);