drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()
authorjsg <jsg@openbsd.org>
Fri, 13 Jan 2023 01:32:39 +0000 (01:32 +0000)
committerjsg <jsg@openbsd.org>
Fri, 13 Jan 2023 01:32:39 +0000 (01:32 +0000)
From Dan Carpenter
20a07570c1667a48fe50fdfa59f4ece57775b69a in linux-6.1.y/6.1.5
3792fc508c095abd84b10ceae12bd773e61fdc36 in mainline linux

sys/dev/pci/drm/i915/gvt/scheduler.c

index d6fe94c..8342d95 100644 (file)
@@ -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;
        }