drm/ttm: Simplify ttm_dma_page_put()
authorTom St Denis <tom.stdenis@amd.com>
Thu, 25 Jan 2018 18:40:21 +0000 (13:40 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:19:02 +0000 (14:19 -0500)
Remove redundant store of return code.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c

index fcd1680..b122f6e 100644 (file)
@@ -390,14 +390,12 @@ static void ttm_dma_page_put(struct dma_pool *pool, struct dma_page *d_page)
 {
        struct page *page = d_page->p;
        unsigned i, num_pages;
-       int ret;
 
        /* Don't set WB on WB page pool. */
        if (!(pool->type & IS_CACHED)) {
                num_pages = pool->size / PAGE_SIZE;
                for (i = 0; i < num_pages; ++i, ++page) {
-                       ret = set_pages_array_wb(&page, 1);
-                       if (ret) {
+                       if (set_pages_array_wb(&page, 1)) {
                                pr_err("%s: Failed to set %d pages to wb!\n",
                                       pool->dev_name, 1);
                        }