drm/ttm: init locked again to prevent incorrect unlock
authorRoger He <Hongbo.He@amd.com>
Thu, 7 Dec 2017 04:51:19 +0000 (12:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Dec 2017 15:23:02 +0000 (10:23 -0500)
Signed-off-by: Roger He <Hongbo.He@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_bo.c

index 97c3da6d5f17b75530ccae023abf357122101210..7a9abc2a3a988b02e0e3d667a9be611150d9d547 100644 (file)
@@ -737,6 +737,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
                                                                      place)) {
                                if (locked)
                                        reservation_object_unlock(bo->resv);
+                               locked = false;
                                continue;
                        }
                        break;