aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt2016-07-26 13:47:15 -0700
committerEric Anholt2016-08-19 19:17:39 -0700
commit552416c146fadc67cd9b53ef7adf88d3381c43a6 (patch)
tree99e37ece2f7ef9c144a03d28dfae103c16695680
parent9326e6f25574bbb8bd48206d245654780e3fd665 (diff)
drm/vc4: Fix oops when userspace hands in a bad BO.
We'd end up NULL pointer dereferencing because we didn't take the error path out in the parent. Fixes igt vc4_lookup_fail test. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index fba2c831afe6..b262c5c26f10 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -573,7 +573,7 @@ vc4_cl_lookup_bos(struct drm_device *dev,
fail:
drm_free_large(handles);
- return 0;
+ return ret;
}
static int