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@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449>
This commit is contained in:
committed by
Marge Bot
parent
d13b7d6591
commit
cd9907e7d3
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user