Skip to content

Commit ab2335d

Browse files
committed
ALSA: ump: Drop redundant check of note-on with zero velocity
The check of a note-on event with zero velocity is done twice, and the latter one is superfluous. Let's drop it. Fixes: 0b5288f ("ALSA: ump: Add legacy raw MIDI support") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/4683198a-84f6-4238-9e87-c70667d84523@kili.mountain Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20230525083124.15277-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent dafb82e commit ab2335d

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

sound/core/ump_convert.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,6 @@ static int cvt_legacy_cmd_to_ump(struct snd_ump_endpoint *ump,
340340

341341
switch (status) {
342342
case UMP_MSG_STATUS_NOTE_ON:
343-
if (!buf[2])
344-
status = UMP_MSG_STATUS_NOTE_OFF;
345-
fallthrough;
346343
case UMP_MSG_STATUS_NOTE_OFF:
347344
midi2->note.note = buf[1];
348345
midi2->note.velocity = upscale_7_to_16bit(buf[2]);

0 commit comments

Comments
 (0)