Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-09-08 16:24:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-05 09:47:34 +0200
commit2790c64d1e4c8c299d86b827882caf580eb5f2cf (patch)
treebeff74a11a4a7dd7031685d6f86dc00ce98472fa
parent67c423c9e885e34bc2829a0baae4cbf54312502d (diff)
etnaviv: fix submit error path
commit 5a642e6bc49f59922e19ebd639e74f72753fc77b upstream. If the gpu submit fails, bail out to avoid accessing a potentially unititalized fence. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index 6463fc2c736f..b95362186f9c 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -445,8 +445,10 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
cmdbuf->user_size = ALIGN(args->stream_size, 8);
ret = etnaviv_gpu_submit(gpu, submit, cmdbuf);
- if (ret == 0)
- cmdbuf = NULL;
+ if (ret)
+ goto out;
+
+ cmdbuf = NULL;
if (args->flags & ETNA_SUBMIT_FENCE_FD_OUT) {
/*