diff options
author | Lucas Stach | 2017-09-08 16:24:32 +0200 |
---|---|---|
committer | Lucas Stach | 2017-09-13 15:06:42 +0200 |
commit | 5a642e6bc49f59922e19ebd639e74f72753fc77b (patch) | |
tree | 2efec9d45dd02f31a853bfabb6f91b6db57686ed /drivers/gpu | |
parent | 569dbb88e80deb68974ef6fdd6a13edb9d686261 (diff) |
etnaviv: fix submit error path
If the gpu submit fails, bail out to avoid accessing a potentially
unititalized fence.
CC: stable@vger.kernel.org #4.12+
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 |
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) { /* |