diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-04-13 22:52:17 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-04-13 21:26:56 +0100 |
commit | be02f7556447a0dee672acb5e462f03377b98ae8 (patch) | |
tree | 284beea4ed2a43fc37ba8df3b3c67f381d9eda4a | |
parent | 9301397a63b3bf1090dffe846c6f1c8efa032236 (diff) | |
download | lwn-be02f7556447a0dee672acb5e462f03377b98ae8.tar.gz lwn-be02f7556447a0dee672acb5e462f03377b98ae8.zip |
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>
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_request.c | 2 |
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, /* 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); |