From: Arina Kharlamova In tascam_midi_out_work_handler() the "No more data" break sits inside scoped_guard(), so it only leaves the guarded block and not the while loop. The URB is then anchored and submitted with the previous buffer contents and length, without its bit set in midi_out_urbs_in_flight. Return from the handler instead, as the "no free URBs" case already does. The guard drops the lock on return. Fixes: 67afec157fe6 ("ALSA: usb-audio: us144mkii: Add MIDI support and mixer controls") Cc: stable@vger.kernel.org Signed-off-by: Arina Kharlamova --- Found by checks derived from the spec2patch kernel API specifications, with the help of an AI coding assistant (Claude); I reviewed the analysis and the fix. --- sound/usb/usx2y/us144mkii_midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/usx2y/us144mkii_midi.c b/sound/usb/usx2y/us144mkii_midi.c index 4871797b1670..15299c27dad8 100644 --- a/sound/usb/usx2y/us144mkii_midi.c +++ b/sound/usb/usx2y/us144mkii_midi.c @@ -252,7 +252,7 @@ static void tascam_midi_out_work_handler(struct work_struct *work) bytes_to_send = snd_rawmidi_transmit(substream, buf, 8); if (bytes_to_send <= 0) - break; /* No more data */ + return; /* No more data */ if (bytes_to_send < 9) memset(buf + bytes_to_send, 0xfd, --- base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5 change-id: 20261129-s2p-c02-10a2009435a8 Best regards, -- Arina Kharlamova