vc4: Fix return values from recent validation changes.
authorEric Anholt <eric@anholt.net>
Wed, 29 Jul 2015 19:20:33 +0000 (12:20 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 30 Jul 2015 22:46:27 +0000 (15:46 -0700)
src/gallium/drivers/vc4/kernel/vc4_validate.c

index e81dd9935ca410159919e2ed4e3308498b5ed1d8..cba948a1c670e726575600727527bee6d60fcc2c 100644 (file)
@@ -207,7 +207,7 @@ validate_flush(VALIDATE_ARGS)
 {
        if (!validate_bin_pos(exec, untrusted, exec->args->bin_cl_size - 1)) {
                DRM_ERROR("Bin CL must end with VC4_PACKET_FLUSH\n");
-               return false;
+               return -EINVAL;
        }
        exec->found_flush = true;
 
@@ -783,17 +783,17 @@ validate_gl_shader_rec(struct drm_device *dev,
        for (i = 0; i < shader_reloc_count; i++) {
                if (src_handles[i] > exec->bo_count) {
                        DRM_ERROR("Shader handle %d too big\n", src_handles[i]);
-                       return false;
+                       return -EINVAL;
                }
 
                bo[i] = exec->bo[src_handles[i]];
                if (!bo[i])
-                       return false;
+                       return -EINVAL;
        }
        for (i = shader_reloc_count; i < nr_relocs; i++) {
                bo[i] = vc4_use_bo(exec, src_handles[i]);
                if (!bo[i])
-                       return false;
+                       return -EINVAL;
        }
 
        for (i = 0; i < shader_reloc_count; i++) {