From: Yisheng Xie Date: Mon, 12 Feb 2018 10:43:13 +0000 (+0800) Subject: staging: android: ion: Cleanup ion_page_pool_alloc_pages X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=acb42f8e89efcf116aa56f4be31776d809e8aa79;p=openwrt%2Fstaging%2Fblogic.git staging: android: ion: Cleanup ion_page_pool_alloc_pages ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page pools. If alloc_pages return NULL, it will return NULL, or it will return the pages allocate from alloc_pages. So we can just return alloc_pages without any judgement. Acked-by: Sumit Semwal Signed-off-by: Yisheng Xie Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index e3a6e327ec0a..6d2caf04943c 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -11,13 +11,9 @@ #include "ion.h" -static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool) +static inline struct page *ion_page_pool_alloc_pages(struct ion_page_pool *pool) { - struct page *page = alloc_pages(pool->gfp_mask, pool->order); - - if (!page) - return NULL; - return page; + return alloc_pages(pool->gfp_mask, pool->order); } static void ion_page_pool_free_pages(struct ion_page_pool *pool,