diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-12-03 11:45:17 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-03 13:15:44 +0000 |
commit | 14f2d7604f7ce4cb3d303aea17292d119dfafa75 (patch) | |
tree | 336a50f70e8d85abc80079b24d4aeedd1984fb98 /drivers | |
parent | 7d1a31e128d3cb939cd70c95f898c13f85155571 (diff) | |
download | linux-14f2d7604f7ce4cb3d303aea17292d119dfafa75.tar.bz2 |
drm/i915/gem: Check the correct variable in selftest
There is a copy and paste bug in this code. It's supposed to check
"obj2" instead of checking "obj" a second time.
Fixes: 80f0b679d6f0 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/8ilneOcJAjwqU4t@mwand
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_gem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c index 23a6132c5f4e..412e21604a05 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c @@ -211,8 +211,8 @@ static int igt_gem_ww_ctx(void *arg) return PTR_ERR(obj); obj2 = i915_gem_object_create_internal(i915, PAGE_SIZE); - if (IS_ERR(obj)) { - err = PTR_ERR(obj); + if (IS_ERR(obj2)) { + err = PTR_ERR(obj2); goto put1; } |