From: kbuild test robot PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 06f66e50fb72 ("drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2.") CC: Maarten Lankhorst Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- url: https://github.com/0day-ci/linux/commits/Maarten-Lankhorst/Revert-drm-i915-gem-Drop-relocation-slowpath/20200401-005710 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip :::::: branch date: 17 hours ago :::::: commit date: 17 hours ago Please take the patch only if it's a positive warning. Thanks! i915_gem_object_blt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c @@ -368,7 +368,7 @@ int i915_gem_object_copy_blt(struct drm_ vma[1] = i915_vma_instance(dst, vm, NULL); if (IS_ERR(vma[1])) - return PTR_ERR(vma); + return PTR_ERR(vma[1]); i915_gem_ww_ctx_init(&ww, true); intel_engine_pm_get(ce->engine);