]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/ttm: Fix error code in i915_ttm_eviction_valuable()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 22 Nov 2021 07:41:47 +0000 (10:41 +0300)
committerMatthew Auld <matthew.auld@intel.com>
Mon, 22 Nov 2021 14:20:44 +0000 (14:20 +0000)
This function returns a bool type so returning -EBUSY is equivalent to
returning true.  It should return false instead.

Fixes: d659f0ef280f ("drm/i915/ttm: add tt shmem backend")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211122061438.GA2492@kili
drivers/gpu/drm/i915/gem/i915_gem_ttm.c

index d08a270b0921adfeb9a6f4034b31418171938718..753f0f5458b650022bdb690ce6bcb9b6e1a61d5f 100644 (file)
@@ -332,7 +332,7 @@ static bool i915_ttm_eviction_valuable(struct ttm_buffer_object *bo,
         * but we would like to avoid grabbing locks for no good reason.
         */
        if (bo->ttm && bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL)
-               return -EBUSY;
+               return false;
 
        /* Will do for now. Our pinned objects are still on TTM's LRU lists */
        return i915_gem_object_evictable(obj);