Explorar o código

drm/ttm: fix an error path to exit function correctly

Just a goto instead of a direct exit.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Thomas Hellstrom %!s(int64=16) %!d(string=hai) anos
pai
achega
87ef92092f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gpu/drm/ttm/ttm_bo.c

+ 1 - 1
drivers/gpu/drm/ttm/ttm_bo.c

@@ -282,7 +282,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
 
 
 		ret = ttm_tt_set_placement_caching(bo->ttm, mem->placement);
 		ret = ttm_tt_set_placement_caching(bo->ttm, mem->placement);
 		if (ret)
 		if (ret)
-			return ret;
+			goto out_err;
 
 
 		if (mem->mem_type != TTM_PL_SYSTEM) {
 		if (mem->mem_type != TTM_PL_SYSTEM) {
 			ret = ttm_tt_bind(bo->ttm, mem);
 			ret = ttm_tt_bind(bo->ttm, mem);