From: Tvrtko Ursulin Date: Fri, 19 Sep 2025 13:15:28 +0000 (+0100) Subject: drm/ttm: Resource cannot be NULL in ttm_resource_intersects X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=feb065155bab2fabc3545bf57ae31e86d02df9a1;p=thirdparty%2Fkernel%2Flinux.git drm/ttm: Resource cannot be NULL in ttm_resource_intersects 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 --- 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;