r600: use list_is_linked
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Tue, 15 Dec 2020 14:59:47 +0000 (15:59 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 18 Dec 2020 01:46:00 +0000 (01:46 +0000)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>

src/gallium/drivers/r600/r600_shader.c

index df27f05..8d12c66 100644 (file)
@@ -377,7 +377,7 @@ error:
 void r600_pipe_shader_destroy(struct pipe_context *ctx UNUSED, struct r600_pipe_shader *shader)
 {
        r600_resource_reference(&shader->bo, NULL);
-        if (shader->shader.bc.cf.next)
+       if (list_is_linked(&shader->shader.bc.cf))
                r600_bytecode_clear(&shader->shader.bc);
        r600_release_command_buffer(&shader->command_buffer);
 }