diff options
author | Ben Marsh <bmarsh94@gmail.com> | 2016-04-07 19:26:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 00:40:50 (GMT) |
commit | 3229ff343c70163b5425e54cce1f313a9be6b85e (patch) | |
tree | 19db17d43b9e9b6acf957fc4d63c05576e92e01d /drivers/staging | |
parent | 9fea19a9a4bb22a237972d50e41219ddd479ea22 (diff) | |
download | linux-3229ff343c70163b5425e54cce1f313a9be6b85e.tar.xz |
Staging: android: modify memory allocation style in ion_chunk_heap.c
Modify memory allocation style in order to silence a checkpatch.pl
warning.
Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/ion/ion_chunk_heap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c index 0813163..e0553fe 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 = kmalloc(sizeof(struct sg_table), GFP_KERNEL); + table = kmalloc(sizeof(*table), GFP_KERNEL); if (!table) return -ENOMEM; ret = sg_alloc_table(table, num_chunks, GFP_KERNEL); @@ -154,7 +154,7 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data) if (ret) return ERR_PTR(ret); - chunk_heap = kzalloc(sizeof(struct ion_chunk_heap), GFP_KERNEL); + chunk_heap = kzalloc(sizeof(*chunk_heap), GFP_KERNEL); if (!chunk_heap) return ERR_PTR(-ENOMEM); |