From b4ba761352d91040f817cae677912e5241b0281a Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Thu, 22 Feb 2018 21:05:28 +0900 Subject: [PATCH] android: ion: fix missing error number in cma heap Change-Id: Ib08aa1eefbeb954327ce8052471c621fb1a91063 Signed-off-by: Cho KyongHo --- drivers/staging/android/ion/ion_cma_heap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c index 27d6d2ff972a..f4e747e9477b 100644 --- a/drivers/staging/android/ion/ion_cma_heap.c +++ b/drivers/staging/android/ion/ion_cma_heap.c @@ -45,7 +45,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, unsigned long size = PAGE_ALIGN(len); unsigned long nr_pages = size >> PAGE_SHIFT; unsigned long align = get_order(size); - int ret; + int ret = -ENOMEM; if (align > CONFIG_CMA_ALIGNMENT) align = CONFIG_CMA_ALIGNMENT; @@ -92,7 +92,7 @@ free_mem: kfree(table); err: cma_release(cma_heap->cma, pages, nr_pages); - return -ENOMEM; + return ret; } static void ion_cma_free(struct ion_buffer *buffer) -- 2.20.1