diff options
| -rw-r--r-- | drivers/gpu/drm/i915/gvt/gtt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c index 7600416db908..08c74e65836b 100644 --- a/drivers/gpu/drm/i915/gvt/gtt.c +++ b/drivers/gpu/drm/i915/gvt/gtt.c | |||
| @@ -1076,6 +1076,9 @@ static struct intel_vgpu_ppgtt_spt *ppgtt_populate_spt_by_guest_entry( | |||
| 1076 | } else { | 1076 | } else { |
| 1077 | int type = get_next_pt_type(we->type); | 1077 | int type = get_next_pt_type(we->type); |
| 1078 | 1078 | ||
| 1079 | if (!gtt_type_is_pt(type)) | ||
| 1080 | goto err; | ||
| 1081 | |||
| 1079 | spt = ppgtt_alloc_spt_gfn(vgpu, type, ops->get_pfn(we), ips); | 1082 | spt = ppgtt_alloc_spt_gfn(vgpu, type, ops->get_pfn(we), ips); |
| 1080 | if (IS_ERR(spt)) { | 1083 | if (IS_ERR(spt)) { |
| 1081 | ret = PTR_ERR(spt); | 1084 | ret = PTR_ERR(spt); |
