gallium/cso: avoid unnecessary null dereference

The label `out:` calls `destroy()` which dereferences `ctx`.
This is unnecessary as there is nothing to destroy.
Immediately return instead.

CovID: 1258255
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Eric Engestrom 2016-07-12 22:48:28 +01:00 committed by Emil Velikov
parent 2f86582b92
commit 9411eb67ec
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
{
struct cso_context *ctx = CALLOC_STRUCT(cso_context);
if (!ctx)
goto out;
return NULL;
ctx->cache = cso_cache_create();
if (ctx->cache == NULL)