[PATCH] drm/drm_vma_manager.c: Remove useless goto statement

Chris Wilson chris at chris-wilson.co.uk
Wed Nov 1 14:11:44 UTC 2017


Quoting Liviu Dudau (2017-11-01 14:04:24)
> Commit db2395eccf08i ("drm: Convert drm_vma_manager to embedded
> interval-tree in drm_mm") removed a line in drm_vma_offset_add() function
> that makes checking the result of calling drm_mm_insert_node() and the
> goto call redundant. Remove them.
> 
> Fixes: db2395eccf08i ("drm: Convert drm_vma_manager to embedded interval-tree in drm_mm")
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Liviu Dudau <liviu.dudau at arm.com>
> ---
>  drivers/gpu/drm/drm_vma_manager.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_vma_manager.c b/drivers/gpu/drm/drm_vma_manager.c
> index 28f1226576f8c..e545a7b2bcafc 100644
> --- a/drivers/gpu/drm/drm_vma_manager.c
> +++ b/drivers/gpu/drm/drm_vma_manager.c
> @@ -213,8 +213,6 @@ int drm_vma_offset_add(struct drm_vma_offset_manager *mgr,
>         }
>  
>         ret = drm_mm_insert_node(&mgr->vm_addr_space_mm, &node->vm_node, pages);
> -       if (ret)
> -               goto out_unlock;

Whilst you are here, you might consider this function too simple to even
require the out_unlock...
-Chris


More information about the dri-devel mailing list