public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] drm/vc4: fix a bounds check
@ 2017-01-13  7:49 Dan Carpenter
  2017-01-16 23:40 ` Eric Engestrom
  2017-01-17 10:18 ` Eric Anholt
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-13  7:49 UTC (permalink / raw)
  To: Eric Anholt; +Cc: kernel-janitors, dri-devel

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>
---
Not tested.

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-17 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13  7:49 [patch] drm/vc4: fix a bounds check Dan Carpenter
2017-01-16 23:40 ` Eric Engestrom
2017-01-17  7:42   ` Dan Carpenter
2017-01-17 10:18 ` Eric Anholt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox