Mesa (master): anv: remove dead code from anv_create_cmd_buffer
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 5 12:14:33 UTC 2020
Module: Mesa
Branch: master
Commit: cd9907e7d39961e60bb68314139d6f74836b502b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd9907e7d39961e60bb68314139d6f74836b502b
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Wed Nov 4 17:49:54 2020 +0100
anv: remove dead code from anv_create_cmd_buffer
pool can't be NULL at this point, because it was already
dereferenced earlier.
Addresses "Dereference before null check" issue reported by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449>
---
src/intel/vulkan/anv_cmd_buffer.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index bbd1c9ac47f..c28a8fc2d88 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -270,14 +270,7 @@ static VkResult anv_create_cmd_buffer(
anv_cmd_state_init(cmd_buffer);
- if (pool) {
- list_addtail(&cmd_buffer->pool_link, &pool->cmd_buffers);
- } else {
- /* Init the pool_link so we can safefly call list_del when we destroy
- * the command buffer
- */
- list_inithead(&cmd_buffer->pool_link);
- }
+ list_addtail(&cmd_buffer->pool_link, &pool->cmd_buffers);
*pCommandBuffer = anv_cmd_buffer_to_handle(cmd_buffer);
More information about the mesa-commit
mailing list