diff options
author | Gioh Kim <gioh.kim@lge.com> | 2014-04-25 08:24:24 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-25 15:17:31 -0700 |
commit | b6152016003b2cc2370899558bf2e7de4ebd0b09 (patch) | |
tree | 388c2f2bac4062897f3786c79e2857455da0b5b7 /drivers/staging/android/ion/ion_system_heap.c | |
parent | d7a33d74e9913bd4d2580aff67ed7051935f546b (diff) |
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_system_heap.c')
-rw-r--r-- | drivers/staging/android/ion/ion_system_heap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index c92363356ae1..0663a7fbfa60 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -166,7 +166,7 @@ static int ion_system_heap_allocate(struct ion_heap *heap, max_order = info->order; i++; } - table = kzalloc(sizeof(struct sg_table), GFP_KERNEL); + table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); if (!table) goto err; @@ -356,7 +356,7 @@ static int ion_system_contig_heap_allocate(struct ion_heap *heap, for (i = len >> PAGE_SHIFT; i < (1 << order); i++) __free_page(page + i); - table = kzalloc(sizeof(struct sg_table), GFP_KERNEL); + table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); if (!table) { ret = -ENOMEM; goto out; |