Skip to contentSkip to conversation

drm/i915: fix odd_ptr_err.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Apr 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: fix odd_ptr_err.cocci warnings

From: kbuild test robot <[email protected]>

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 <[email protected]>

---

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(-)
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c +1 -1
@@ -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);