summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2018-01-25 21:40:21 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 22:19:02 +0300
commit7ca34ddc7866230a1a6c2fa9cc0167dd841bd583 (patch)
tree0e3577478bfb02f82c17051728ca50a06ae70522 /drivers/gpu/drm/ttm
parent42bdbb6e0f3a14d2a0d924949fa3af0049eadd90 (diff)
downloadlinux-7ca34ddc7866230a1a6c2fa9cc0167dd841bd583.tar.xz
drm/ttm: Simplify ttm_dma_page_put()
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>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc_dma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
index fcd16804c738..b122f6eee94c 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
@@ -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);
}