summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYisheng Xie <xieyisheng1@huawei.com>2018-02-12 11:43:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-16 17:29:07 +0100
commita3f75c43594ccfe6de8994c69ccf17aabb6f8114 (patch)
tree5013e91987c2543443a524d1d4a0e1d1e444e142 /drivers
parentstaging: android: ion: Remove lable debugfs_done (diff)
downloadlinux-a3f75c43594ccfe6de8994c69ccf17aabb6f8114.tar.xz
linux-a3f75c43594ccfe6de8994c69ccf17aabb6f8114.zip
staging: android: ion: Remove dead code in ion_page_pool_free
ion_page_pool_add will always return 0, however ion_page_pool_free will call ion_page_pool_free_pages when ion_page_pool_add's return value is not 0, so it is a dead code which can be removed. Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/android/ion/ion_page_pool.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c
index 4452e288c893..150626ffc24a 100644
--- a/drivers/staging/android/ion/ion_page_pool.c
+++ b/drivers/staging/android/ion/ion_page_pool.c
@@ -79,13 +79,9 @@ struct page *ion_page_pool_alloc(struct ion_page_pool *pool)
void ion_page_pool_free(struct ion_page_pool *pool, struct page *page)
{
- int ret;
-
BUG_ON(pool->order != compound_order(page));
- ret = ion_page_pool_add(pool, page);
- if (ret)
- ion_page_pool_free_pages(pool, page);
+ ion_page_pool_add(pool, page);
}
static int ion_page_pool_total(struct ion_page_pool *pool, bool high)