diff options
author | Takashi Iwai <[email protected]> | 2023-05-25 10:31:23 +0200 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2023-05-25 10:32:58 +0200 |
commit | ab2335daa6ef70df56c98c216261a93e28ae52b3 (patch) | |
tree | 8215afa20eb67863b3cc77b3191dbc810215ef5a | |
parent | dafb82e7d39767f11660705a518a551251fbdfe4 (diff) |
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: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]
Suggested-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
-rw-r--r-- | sound/core/ump_convert.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sound/core/ump_convert.c b/sound/core/ump_convert.c index cb7c2f959a27..164829d3e305 100644 --- a/sound/core/ump_convert.c +++ b/sound/core/ump_convert.c @@ -340,9 +340,6 @@ static int cvt_legacy_cmd_to_ump(struct snd_ump_endpoint *ump, switch (status) { case UMP_MSG_STATUS_NOTE_ON: - if (!buf[2]) - status = UMP_MSG_STATUS_NOTE_OFF; - fallthrough; case UMP_MSG_STATUS_NOTE_OFF: midi2->note.note = buf[1]; midi2->note.velocity = upscale_7_to_16bit(buf[2]); |