Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5ec7fe8 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Chris Wilson
Browse files

drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'



Goto the right label in case of error, otherwise there is a leak.
This has been introduced by c5cf9a91. In this patch a goto has not been
updated.

Fixes: c5cf9a91 ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patchwork.freedesktop.org/patch/msgid/20170719223503.30580-1-christophe.jaillet@wanadoo.fr


Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent bca2bf2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ struct drm_i915_private *mock_gem_device(void)
	mkwrite_device_info(i915)->ring_mask = BIT(0);
	i915->engine[RCS] = mock_engine(i915, "mock");
	if (!i915->engine[RCS])
		goto err_dependencies;
		goto err_priorities;

	i915->kernel_context = mock_context(i915, NULL);
	if (!i915->kernel_context)