From feb065155bab2fabc3545bf57ae31e86d02df9a1 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Fri, 19 Sep 2025 14:15:28 +0100 Subject: [PATCH] drm/ttm: Resource cannot be NULL in ttm_resource_intersects MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Function has a single caller and the resource cannot be NULL therefore remove the early return check. Signed-off-by: Tvrtko Ursulin Reviewed-by: Thadeu Lima de Souza Cascardo Reviewed-by: Christian König Signed-off-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20250919131530.91247-3-tvrtko.ursulin@igalia.com --- drivers/gpu/drm/ttm/ttm_resource.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c index f5aa29dc6ec0c..2dd19f229d32b 100644 --- a/drivers/gpu/drm/ttm/ttm_resource.c +++ b/drivers/gpu/drm/ttm/ttm_resource.c @@ -446,9 +446,6 @@ bool ttm_resource_intersects(struct ttm_device *bdev, { struct ttm_resource_manager *man; - if (!res) - return false; - man = ttm_manager_type(bdev, res->mem_type); if (!place || !man->func->intersects) return true; -- 2.47.3