On Fri, Sep 19, 2025 at 02:15:28PM +0100, Tvrtko Ursulin wrote: > Function has a single caller and the resource cannot be NULL therefore > remove the early return check. > > Signed-off-by: Tvrtko Ursulin <[email protected]> > --- > 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 e2c82ad07eb4..b78be0c342f2 100644 > --- a/drivers/gpu/drm/ttm/ttm_resource.c > +++ b/drivers/gpu/drm/ttm/ttm_resource.c > @@ -445,9 +445,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.48.0 >
I see a single caller, where the resource is dereferenced right before the function call, so: Reviewed-by: Thadeu Lima de Souza Cascardo <[email protected]>
