summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorPhong Tran <tranmanphong@gmail.com>2014-07-20 11:10:55 +0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-21 12:26:55 -0700
commitf0ca3e87cc132b67c40ba1161cd02c8a2985ac4c (patch)
tree20f9ce186c823da1fb97670f3ecd66e7818676ff /drivers/staging/android
parentbc0c9da55b25bc79363535da9ec20b1a144fe1c8 (diff)
downloadop-kernel-dev-f0ca3e87cc132b67c40ba1161cd02c8a2985ac4c.zip
op-kernel-dev-f0ca3e87cc132b67c40ba1161cd02c8a2985ac4c.tar.gz
staging: android: ion: ion_cma_heap.c: Fix checkpatch warning
This patch fix coding style: - Remove "fail memory allocation" waring - Remove return of void function Tested by compilation only Signed-off-by: Phong Tran <tranmanphong@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/ion/ion_cma_heap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index ce68ecf..f8cabcb 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -76,10 +76,8 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
return -EINVAL;
info = kzalloc(sizeof(struct ion_cma_buffer_info), GFP_KERNEL);
- if (!info) {
- dev_err(dev, "Can't allocate buffer info\n");
+ if (!info)
return ION_CMA_ALLOCATE_FAILED;
- }
info->cpu_addr = dma_alloc_coherent(dev, len, &(info->handle),
GFP_HIGHUSER | __GFP_ZERO);
@@ -90,10 +88,8 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
}
info->table = kmalloc(sizeof(struct sg_table), GFP_KERNEL);
- if (!info->table) {
- dev_err(dev, "Fail to allocate sg table\n");
+ if (!info->table)
goto free_mem;
- }
if (ion_cma_get_sgtable
(dev, info->table, info->cpu_addr, info->handle, len))
@@ -155,7 +151,6 @@ static struct sg_table *ion_cma_heap_map_dma(struct ion_heap *heap,
static void ion_cma_heap_unmap_dma(struct ion_heap *heap,
struct ion_buffer *buffer)
{
- return;
}
static int ion_cma_mmap(struct ion_heap *mapper, struct ion_buffer *buffer,
OpenPOWER on IntegriCloud