提交 657314b7 编写于 作者: L Lucas Stach

drm/etnaviv: don't put fence in case of submit failure

If we bail out of the submit before actually adding the cmdstream
to the kernel ring there is no valid fence to put. Make sure to skip
the fence_put in that case.
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
上级 8b03d1ed
......@@ -44,6 +44,7 @@ static struct etnaviv_gem_submit *submit_create(struct drm_device *dev,
/* initially, until copy_from_user() and bo lookup succeeds: */
submit->nr_bos = 0;
submit->fence = NULL;
ww_acquire_init(&submit->ticket, &reservation_ww_class);
}
......@@ -294,7 +295,8 @@ static void submit_cleanup(struct etnaviv_gem_submit *submit)
}
ww_acquire_fini(&submit->ticket);
dma_fence_put(submit->fence);
if (submit->fence)
dma_fence_put(submit->fence);
kfree(submit);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册