From: jsg Date: Fri, 13 Jan 2023 01:32:39 +0000 (+0000) Subject: drm/i915: unpin on error in intel_vgpu_shadow_mm_pin() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=744fb74bb64db9b51b4b89e7151f1b54a90a92a7;p=openbsd 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 --- 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; }