drm/i915: checking for NULL instead of IS_ERR() in mock selftests
i915_gem_request_alloc() uses error pointers. It never returns NULLs. Fixes:0daf0113cf
("drm/i915: Mock infrastructure for request emission") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170413195217.GA26108@mwanda Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commitbe02f75564
) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
dea6559398
commit
5af9e672b8
|
@ -35,7 +35,7 @@ mock_request(struct intel_engine_cs *engine,
|
|||
|
||||
/* NB the i915->requests slab cache is enlarged to fit mock_request */
|
||||
request = i915_gem_request_alloc(engine, context);
|
||||
if (!request)
|
||||
if (IS_ERR(request))
|
||||
return NULL;
|
||||
|
||||
mock = container_of(request, typeof(*mock), base);
|
||||
|
|
Loading…
Reference in New Issue