drm/vc4: fix a bounds check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Jan 2017 07:49:00 +0000 (10:49 +0300)
committerEric Anholt <eric@anholt.net>
Tue, 17 Jan 2017 10:12:59 +0000 (21:12 +1100)
We accidentally return success even if vc4_full_res_bounds_check() fails.

Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_render_cl.c

index 08886a3097577242f5c9e025fd6446d81bcc6dec..5cdd003605f57c99faf31832e3f3dd38a75b7402 100644 (file)
@@ -461,7 +461,7 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec,
                }
 
                ret = vc4_full_res_bounds_check(exec, *obj, surf);
-               if (!ret)
+               if (ret)
                        return ret;
 
                return 0;