drm/i915/gvt: Off by one in intel_vgpu_write_fence()

The > should be >= here so that we don't read one element beyond the
end of the array.

Fixes: 28a60dee2c ("drm/i915/gvt: vGPU HW resource management")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
This commit is contained in:
Dan Carpenter 2018-08-07 09:46:02 +03:00 committed by Zhenyu Wang
parent de5372da60
commit 4b25e737cf
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ void intel_vgpu_write_fence(struct intel_vgpu *vgpu,
assert_rpm_wakelock_held(dev_priv);
if (WARN_ON(fence > vgpu_fence_sz(vgpu)))
if (WARN_ON(fence >= vgpu_fence_sz(vgpu)))
return;
reg = vgpu->fence.regs[fence];