drm/i915/gvt: fix typo in cfg_space range check

PCI basic config space's size is 256 bytes. When check if access crosses
space range, should use "> 256".

Signed-off-by: Pei Zhang <pei.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
This commit is contained in:
Pei Zhang 2016-12-23 23:55:08 +08:00 committed by Zhenyu Wang
parent 34700631bd
commit 4e0203ba11
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ int intel_vgpu_emulate_cfg_write(struct intel_vgpu *vgpu, unsigned int offset,
if (WARN_ON(bytes > 4))
return -EINVAL;
if (WARN_ON(offset + bytes >= INTEL_GVT_MAX_CFG_SPACE_SZ))
if (WARN_ON(offset + bytes > INTEL_GVT_MAX_CFG_SPACE_SZ))
return -EINVAL;
/* First check if it's PCI_COMMAND */