From: Dan Carpenter Date: Fri, 13 Jan 2017 07:49:00 +0000 (+0300) Subject: drm/vc4: fix a bounds check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=21ccc32496b2f63228f5232b3ac0e426e8fb3c31;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/vc4: fix a bounds check 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 Reviewed-by: Eric Engestrom Reviewed-by: Eric Anholt --- diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c index 08886a309757..5cdd003605f5 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -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;