From e4fc8d43bb016616d5e733f6f8cc2a4e006300b9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 19 Jan 2025 15:52:48 +0100 Subject: [PATCH] alsa: handle error from _set_client_midi_version() See #4507 --- spa/plugins/alsa/alsa-seq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spa/plugins/alsa/alsa-seq.c b/spa/plugins/alsa/alsa-seq.c index ce6d40394..995eec3a9 100644 --- a/spa/plugins/alsa/alsa-seq.c +++ b/spa/plugins/alsa/alsa-seq.c @@ -34,10 +34,12 @@ static int seq_open(struct seq_state *state, struct seq_conn *conn, bool with_qu if ((res = snd_seq_open(&conn->hndl, props->device, SND_SEQ_OPEN_DUPLEX, - 0)) < 0) { + 0)) < 0) return res; - } - snd_seq_set_client_midi_version(conn->hndl, SND_SEQ_CLIENT_UMP_MIDI_2_0); + + if ((res = snd_seq_set_client_midi_version(conn->hndl, SND_SEQ_CLIENT_UMP_MIDI_2_0)) < 0) + return res; + return 0; }