Commit 8a0e4b9e authored by Youngdo, Lee's avatar Youngdo, Lee Committed by Greg Kroah-Hartman

staging: android: ion: fix coding style issue

Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl.
Signed-off-by: default avatarYoungdo, Lee <oss.ydlee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 563a8412
...@@ -55,7 +55,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, ...@@ -55,7 +55,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
if (align > PAGE_SIZE) if (align > PAGE_SIZE)
return -EINVAL; return -EINVAL;
info = kzalloc(sizeof(struct ion_cma_buffer_info), GFP_KERNEL); info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info) if (!info)
return -ENOMEM; return -ENOMEM;
...@@ -67,7 +67,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, ...@@ -67,7 +67,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
goto err; goto err;
} }
info->table = kmalloc(sizeof(struct sg_table), GFP_KERNEL); info->table = kmalloc(sizeof(*info->table), GFP_KERNEL);
if (!info->table) if (!info->table)
goto free_mem; goto free_mem;
...@@ -140,7 +140,7 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data) ...@@ -140,7 +140,7 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data)
{ {
struct ion_cma_heap *cma_heap; struct ion_cma_heap *cma_heap;
cma_heap = kzalloc(sizeof(struct ion_cma_heap), GFP_KERNEL); cma_heap = kzalloc(sizeof(*cma_heap), GFP_KERNEL);
if (!cma_heap) if (!cma_heap)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment