[Intel-gfx] [PATCH] drm/i915/execlists: Avoid putting the error pointer
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Mon Jun 11 15:36:48 UTC 2018
On 11/06/18 16:33, Chris Wilson wrote:
> On allocation error, do not jump to the unwind handler that tries to
> free the error opinter.
>
> Reported-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Fixes: a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 3e008adf5a01..43b75f60abf9 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -2770,10 +2770,8 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
> context_size += LRC_HEADER_PAGES * PAGE_SIZE;
>
> ctx_obj = i915_gem_object_create(ctx->i915, context_size);
> - if (IS_ERR(ctx_obj)) {
> - ret = PTR_ERR(ctx_obj);
> - goto error_deref_obj;
> - }
> + if (IS_ERR(ctx_obj))
> + return PTR_ERR(ctx_obj);
>
> vma = i915_vma_instance(ctx_obj, &ctx->i915->ggtt.vm, NULL);
> if (IS_ERR(vma)) {
More information about the Intel-gfx
mailing list