drm/i915/selftests: Fix inconsistent IS_ERR and PTR_ERR
authorKai Song <songkai01@inspur.com>
Fri, 22 Oct 2021 12:06:55 +0000 (20:06 +0800)
committerMatthew Auld <matthew.auld@intel.com>
Mon, 25 Oct 2021 07:55:53 +0000 (08:55 +0100)
Fix inconsistent IS_ERR and PTR_ERR in i915_gem_dmabuf.c

Signed-off-by: Kai Song <songkai01@inspur.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/20211022120655.22173-1-songkai01@inspur.com
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c

index 4a6bb64c3a35410717ccd42c2104c1ba77181ffe..3cc74b0fed068c896bda3b87dfa99c63b6579ac3 100644 (file)
@@ -102,7 +102,7 @@ static int igt_dmabuf_import_same_driver_lmem(void *arg)
        obj = __i915_gem_object_create_user(i915, PAGE_SIZE, &lmem, 1);
        if (IS_ERR(obj)) {
                pr_err("__i915_gem_object_create_user failed with err=%ld\n",
-                      PTR_ERR(dmabuf));
+                      PTR_ERR(obj));
                err = PTR_ERR(obj);
                goto out_ret;
        }
@@ -158,7 +158,7 @@ static int igt_dmabuf_import_same_driver(struct drm_i915_private *i915,
                                            regions, num_regions);
        if (IS_ERR(obj)) {
                pr_err("__i915_gem_object_create_user failed with err=%ld\n",
-                      PTR_ERR(dmabuf));
+                      PTR_ERR(obj));
                err = PTR_ERR(obj);
                goto out_ret;
        }