diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-10-15 14:17:11 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-17 06:06:28 -0400 |
commit | 724097059a8e5df1aa162d153b8f90b0ffbb82dc (patch) | |
tree | 6cef9c43b73c61a3d182db8df2880a812f1abf85 /sound/firewire | |
parent | 69ec98d7e5661a1c98ec51c26d6e91af3bbe0e72 (diff) |
ALSA: firewire-tascam: off by one in handle_midi_tx()
My static checker complains because tscm->spec->midi_capture_ports is
either 2 or 4 but the tscm->tx_midi_substreams[] array has 4 elements so
this is possibly off by one. I have looked at the code and I think it
should be >= instead of > as well.
Fixes: 107cc0129a68 ('ALSA: firewire-tascam: add support for incoming MIDI messages by asynchronous transaction')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/tascam/tascam-transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/tascam/tascam-transaction.c b/sound/firewire/tascam/tascam-transaction.c index 45c3ce3d6020..d4f64ae182e7 100644 --- a/sound/firewire/tascam/tascam-transaction.c +++ b/sound/firewire/tascam/tascam-transaction.c | |||
@@ -158,7 +158,7 @@ static void handle_midi_tx(struct fw_card *card, struct fw_request *request, | |||
158 | 158 | ||
159 | port = b[0] >> 4; | 159 | port = b[0] >> 4; |
160 | /* TODO: support virtual MIDI ports. */ | 160 | /* TODO: support virtual MIDI ports. */ |
161 | if (port > tscm->spec->midi_capture_ports) | 161 | if (port >= tscm->spec->midi_capture_ports) |
162 | goto end; | 162 | goto end; |
163 | 163 | ||
164 | /* Assume the message length. */ | 164 | /* Assume the message length. */ |