[PATCH] drm/i915/selftests: Fix an IS_ERR() vs NULL check

Dan Carpenter dan.carpenter at oracle.com
Tue Mar 26 15:35:52 UTC 2019


On Tue, Mar 26, 2019 at 02:53:49PM +0000, Chris Wilson wrote:
> Quoting Mika Kuoppala (2019-03-26 09:30:57)
> > Dan Carpenter <dan.carpenter at oracle.com> writes:
> > 
> > > The live_context() function returns error pointers.  It never returns
> > > NULL.
> > >
> > > Fixes: 9c1477e83e62 ("drm/i915/selftests: Exercise adding requests to a full GGTT")
> > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> > 
> > Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > 
> > i915_request.c has another :)
> 
> Having found it, you could have typed up the patch :-p
> 

Smatch didn't warn about that one because we didn't dereference it right
away...  I should make a check which complains about the condition
instead of the dereference.

regards,
dan carpenter



More information about the dri-devel mailing list