ao_pipewire: init_boilerplate(): simplify errorhandling

This commit is contained in:
Thomas Weißschuh 2022-10-10 23:49:47 +02:00 committed by Philip Langdale
parent 4bc6686b6a
commit e4505ce744
1 changed files with 3 additions and 7 deletions

View File

@ -388,7 +388,6 @@ static int pipewire_init_boilerplate(struct ao *ao)
{ {
struct priv *p = ao->priv; struct priv *p = ao->priv;
struct pw_context *context; struct pw_context *context;
int ret;
pw_init(NULL, NULL); pw_init(NULL, NULL);
@ -416,15 +415,12 @@ static int pipewire_init_boilerplate(struct ao *ao)
goto error; goto error;
} }
ret = 0;
out:
pw_thread_loop_unlock(p->loop); pw_thread_loop_unlock(p->loop);
return ret; return 0;
error: error:
ret = -1; pw_thread_loop_unlock(p->loop);
goto out; return -1;
} }