public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org,
	Micha?? Winiarski <michal.winiarski@intel.com>,
	Thomas Hellstr?m <thomas.hellstrom@linux.intel.com>,
	David Airlie <airlied@linux.ie>,
	Zhihao Cheng <chengzhihao1@huawei.com>,
	intel-gfx@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset()
Date: Fri, 4 Feb 2022 18:45:51 +0100	[thread overview]
Message-ID: <Yf1mT6cFanBUgEXa@intel.intel> (raw)
In-Reply-To: <20220127084915.GC25644@kili>

Hi Dan,

> There were two error paths in __cancel_reset() which return success
> instead of a negative error code as expected.
> 
> Fixes: 4e6835466771 ("drm/i915/selftests: Add a cancel request selftest that triggers a reset")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> >From static analysis.  I am not 100% sure this.  Please review extra
> carefully!
> 
>  drivers/gpu/drm/i915/selftests/i915_request.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> index 2a99dd7c2fe8..05e9f977757b 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -809,7 +809,8 @@ static int __cancel_reset(struct drm_i915_private *i915,
>  	preempt_timeout_ms = engine->props.preempt_timeout_ms;
>  	engine->props.preempt_timeout_ms = 100;
>  
> -	if (igt_spinner_init(&spin, engine->gt))
> +	err = igt_spinner_init(&spin, engine->gt);
> +	if (err)
>  		goto out_restore;
>  
>  	ce = intel_context_create(engine);
> @@ -838,8 +839,10 @@ static int __cancel_reset(struct drm_i915_private *i915,
>  	}
>  
>  	nop = intel_context_create_request(ce);
> -	if (IS_ERR(nop))
> +	if (IS_ERR(nop)) {
> +		err = PTR_ERR(nop);
>  		goto out_rq;
> +	}

Looks correct to me:

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Thank you,
Andi

  parent reply	other threads:[~2022-02-04 17:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  8:49 [Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset() Dan Carpenter
2022-01-27  9:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-01-28  0:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: fix some error codes in __cancel_reset() (rev2) Patchwork
2022-01-28  5:16 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-04 17:45 ` Andi Shyti [this message]
2022-02-04 21:46   ` [Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset() Rodrigo Vivi

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=Yf1mT6cFanBUgEXa@intel.intel \
    --to=andi.shyti@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=chengzhihao1@huawei.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=michal.winiarski@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /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