drm/ttm: Fix accounting error when fail to get pages for pool
authorXiangliang.Yu <Xiangliang.Yu@amd.com>
Wed, 16 Aug 2017 06:25:51 +0000 (14:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Aug 2017 20:47:44 +0000 (16:47 -0400)
commit9afae2719273fa1d406829bf3498f82dbdba71c7
tree70f438849dc9662f37f8511d1a74e632ff8aca1b
parentd07f14be4d11cf323977672342fb0fc6017052f6
drm/ttm: Fix accounting error when fail to get pages for pool

When fail to get needed page for pool, need to put allocated pages
into pool. But current code has a miscalculation of allocated pages,
correct it.

Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/ttm/ttm_page_alloc.c