intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/execlists: Avoid putting the error pointer
Date: Mon, 11 Jun 2018 16:36:48 +0100	[thread overview]
Message-ID: <b7a65869-d51d-4207-82c9-e08bd2e97a6a@intel.com> (raw)
In-Reply-To: <20180611153332.14824-1-chris@chris-wilson.co.uk>

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@intel.com>
> Fixes: a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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)) {


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-06-11 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 15:33 [PATCH] drm/i915/execlists: Avoid putting the error pointer Chris Wilson
2018-06-11 15:36 ` Lionel Landwerlin [this message]
2018-06-11 16:32   ` Chris Wilson
2018-06-11 15:58 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-06-11 20:23 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7a65869-d51d-4207-82c9-e08bd2e97a6a@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).