From: Dan Carpenter Date: Fri, 13 Jan 2017 07:49:00 +0000 (+0300) Subject: drm/vc4: fix a bounds check X-Git-Tag: v4.9.7~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5270c017f19f32812d7d83ba6e45873b8db503d0;p=platform%2Fkernel%2Flinux-amlogic.git drm/vc4: fix a bounds check commit 21ccc32496b2f63228f5232b3ac0e426e8fb3c31 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c index 08886a3..5cdd003 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;