summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-01-13 01:32:40 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-01-13 01:32:40 +0000
commit3090af49dd517d0779921956e37fe0b3aae1fe83 (patch)
treed8a56eba03116551982b19c043503a3713e05f93 /sys
parent070b7c53f965dd6f66e6056361cf08b83ed88cb6 (diff)
drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()
From Dan Carpenter 20a07570c1667a48fe50fdfa59f4ece57775b69a in linux-6.1.y/6.1.5 3792fc508c095abd84b10ceae12bd773e61fdc36 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/gvt/scheduler.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/gvt/scheduler.c b/sys/dev/pci/drm/i915/gvt/scheduler.c
index d6fe94cd0fd..8342d95f56c 100644
--- a/sys/dev/pci/drm/i915/gvt/scheduler.c
+++ b/sys/dev/pci/drm/i915/gvt/scheduler.c
@@ -696,6 +696,7 @@ intel_vgpu_shadow_mm_pin(struct intel_vgpu_workload *workload)
if (workload->shadow_mm->type != INTEL_GVT_MM_PPGTT ||
!workload->shadow_mm->ppgtt_mm.shadowed) {
+ intel_vgpu_unpin_mm(workload->shadow_mm);
gvt_vgpu_err("workload shadow ppgtt isn't ready\n");
return -EINVAL;
}