From c2e4e336ac504b86c2eef50280bc791eecadc206 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 28 Nov 2023 15:19:05 -0500 Subject: [PATCH] alsa: Correctly bail if pitch ctls are not available The `goto error` got misplaced while refactoring this code for bind-ctls. --- spa/plugins/alsa/alsa-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 72d361dfb..2ba1fac68 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -902,8 +902,9 @@ static int probe_pitch_ctl(struct state *state, const char* device_name) if (opened) { snd_ctl_close(state->ctl); state->ctl = NULL; - goto error; } + + goto error; } snd_ctl_elem_value_set_integer(state->pitch_elem, 0, 1000000);