]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/i915/selftests: Free the batch along the contexts error path
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 19 Sep 2018 19:55:13 +0000 (20:55 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Sep 2018 09:43:29 +0000 (10:43 +0100)
Remember to release the batch bo reference if we hit an error trying to
submit our MI_STORE_DWORD_IMM.

References: https://bugs.freedesktop.org/show_bug.cgi?id=107979
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180919195544.1511-9-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_gem_context.c

index 1c92560d35da6553cea677aaec9d07ed11333a7e..07d700b7cb9440dbaa2e43e6825b71f6f99049bc 100644 (file)
@@ -195,6 +195,7 @@ err_request:
        i915_request_add(rq);
 err_batch:
        i915_vma_unpin(batch);
+       i915_vma_put(batch);
 err_vma:
        i915_vma_unpin(vma);
        return err;