[PATCH] drm/i915: fix odd_ptr_err.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kernel test robot <lkp@xxxxxxxxx>

drivers/gpu/drm/i915/display/intel_dpt.c:145:6-12: inconsistent IS_ERR and PTR_ERR on line 146.

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call to
 IS_ERR that is wrong.

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

url:    https://github.com/0day-ci/linux/commits/Maarten-Lankhorst/drm-i915-Add-ww-context-to-intel_dpt_pin/20210910-162231
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
:::::: branch date: 17 hours ago
:::::: commit date: 17 hours ago

 intel_dpt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/display/intel_dpt.c
+++ b/drivers/gpu/drm/i915/display/intel_dpt.c
@@ -143,7 +143,7 @@ struct i915_vma *intel_dpt_pin(struct i9
 		i915_vma_unpin(vma);
 
 		if (IS_ERR(iomem)) {
-			err = PTR_ERR(vma);
+			err = PTR_ERR(iomem);
 			continue;
 		}
 



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux