From 70435a8ac96c02b1c54682854bcca5de613e4516 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 28 Aug 2023 16:20:18 +0000 Subject: [PATCH] Revert "drm/ttm: check null pointer before accessing when swapping" This reverts commit d39971d902d067b4dc366981b75b17c8c57ed5d1 which is commit 2dedcf414bb01b8d966eb445db1d181d92304fb2 upstream. It breaks the Android kernel abi, and is not needed for any Android devices at this time. If it is needed in the future, it can be brought back in an abi-safe way. Bug: 161946584 Change-Id: I3df03d40d2e60351b9fee2ba30b5cd3dcd1cf35f Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8fe3be20af62..dca4dfdd332d 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -674,8 +674,7 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo, if (bo->pin_count) { *locked = false; - if (busy) - *busy = false; + *busy = false; return false; }