* [PATCH] staging: android: ion: ion_cma_heap.c: Fix checkpatch warning
@ 2014-07-20 4:10 Phong Tran
0 siblings, 0 replies; only message in thread
From: Phong Tran @ 2014-07-20 4:10 UTC (permalink / raw)
To: gregkh, john.stultz, ccross, tranmanphong, fabio.estevam,
rebecca, benjamin.gaignard, devel, linux-kernel
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>
---
drivers/staging/android/ion/ion_cma_heap.c | 9 ++-------
1 file 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,
--
1.9.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-20 4:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 4:10 [PATCH] staging: android: ion: ion_cma_heap.c: Fix checkpatch warning Phong Tran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®