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)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 26 Nov 2017 13:51:04 +0000 (13:51 +0000)
commita08789b3fa9475ecfc767aeba88b0f0303459c90
treea95cdec5befc27eec4cdfb236d6a15128a6a8d52
parent27c98187446ad56a2911e5c83baf4ebf68492b91
drm/ttm: Fix accounting error when fail to get pages for pool

commit 9afae2719273fa1d406829bf3498f82dbdba71c7 upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/ttm/ttm_page_alloc.c