]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/ttm: Resource cannot be NULL in ttm_resource_intersects
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fri, 19 Sep 2025 13:15:28 +0000 (14:15 +0100)
committerTvrtko Ursulin <tursulin@ursulin.net>
Wed, 3 Dec 2025 14:48:24 +0000 (14:48 +0000)
Function has a single caller and the resource cannot be NULL therefore
remove the early return check.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20250919131530.91247-3-tvrtko.ursulin@igalia.com
drivers/gpu/drm/ttm/ttm_resource.c

index f5aa29dc6ec0c1b100ee51030721829e26bcd845..2dd19f229d32b509b9921c765a0e21079e801ad9 100644 (file)
@@ -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;