public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
Date: Thu, 21 Mar 2019 09:22:09 +0000	[thread overview]
Message-ID: <20190321092209.GJ2202@kadam> (raw)
In-Reply-To: <8736ng1u4f.fsf@gaia.fi.intel.com>

On Thu, Mar 21, 2019 at 10:58:40AM +0200, Mika Kuoppala wrote:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
> 
> > The mock_context() function returns NULL on error, it doesn't return
> > error pointers.
> >
> > Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> >  .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
> >  drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
> >  2 files changed, 38 insertions(+), 36 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > index 4399ef9ebf15..a172dbd9cb9e 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
> >  	mutex_lock(&i915->drm.struct_mutex);
> >  
> >  	ctx = mock_context(i915, "mock");
> > -	if (IS_ERR(ctx)) {
> > -		err = PTR_ERR(ctx);
> > +	if (!ctx) {
> > +		err = -ENOMEM;
> >  		goto unlock;
> >  	}
> 
> Yup.
> 
> The rest of the diff is unrelated tho, please resend.
> 

Oh, crap.  Sorry!  It was below the bottom of my page in my email client
so I didn't see it.

regards,
dan carpenter

  reply	other threads:[~2019-03-21  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21  8:33 [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() Dan Carpenter
2019-03-21  8:58 ` Mika Kuoppala
2019-03-21  9:22   ` Dan Carpenter [this message]
2019-03-21  9:24   ` [PATCH v2] " Dan Carpenter
2019-03-21 10:01     ` Mika Kuoppala
2019-03-21 13:31       ` Chris Wilson

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=20190321092209.GJ2202@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=airlied@linux.ie \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=matthew.auld@intel.com \
    --cc=mika.kuoppala@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