alsa: Correctly bail if pitch ctls are not available

The `goto error` got misplaced while refactoring this code for
bind-ctls.
This commit is contained in:
Arun Raghavan 2023-11-28 15:19:05 -05:00 committed by Wim Taymans
parent ac3bdeba4e
commit c2e4e336ac

View file

@ -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);