aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-04-13 15:52:17 -0400
committerJani Nikula <jani.nikula@intel.com>2017-04-26 09:28:24 -0400
commit5af9e672b84f006695b820f791f2eceecca59bbc (patch)
treea57eb735974332466db1202647f231c457237e50
parentdea655939837034f04992cef480162949b7cc19f (diff)
drm/i915: checking for NULL instead of IS_ERR() in mock selftests
i915_gem_request_alloc() uses error pointers. It never returns NULLs. Fixes: 0daf0113cff6 ("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 commit be02f7556447a0dee672acb5e462f03377b98ae8) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/i915/selftests/mock_request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_request.c b/drivers/gpu/drm/i915/selftests/mock_request.c
index 0e8d2e7f8c70..8097e3693ec4 100644
--- a/drivers/gpu/drm/i915/selftests/mock_request.c
+++ b/drivers/gpu/drm/i915/selftests/mock_request.c
@@ -35,7 +35,7 @@ mock_request(struct intel_engine_cs *engine,
35 35
36 /* NB the i915->requests slab cache is enlarged to fit mock_request */ 36 /* NB the i915->requests slab cache is enlarged to fit mock_request */
37 request = i915_gem_request_alloc(engine, context); 37 request = i915_gem_request_alloc(engine, context);
38 if (!request) 38 if (IS_ERR(request))
39 return NULL; 39 return NULL;
40 40
41 mock = container_of(request, typeof(*mock), base); 41 mock = container_of(request, typeof(*mock), base);