]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/i915/selftests/mock_request.c
drm/i915: checking for NULL instead of IS_ERR() in mock selftests
[karo-tx-linux.git] / drivers / gpu / drm / i915 / selftests / mock_request.c
index 0e8d2e7f8c7032ad73b4e99899dd21cfb0d414b5..8097e3693ec484332b333f35e98c012d17e7bf0e 100644 (file)
@@ -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);