The condition should be obviously reversed.
Reported-by: Mark ZurSchmiede <zursch@gmail.com>
Fixes: 5ac61983 ("rawmidi: allow timestamp reads only for the appropriate read mode")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
assert(rawmidi);
assert(rawmidi->stream == SND_RAWMIDI_STREAM_INPUT);
assert(buffer || size == 0);
- if ((rawmidi->params_mode & SNDRV_RAWMIDI_MODE_FRAMING_MASK) == SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP)
+ if ((rawmidi->params_mode & SNDRV_RAWMIDI_MODE_FRAMING_MASK) != SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP)
return -EINVAL;
if (rawmidi->ops->tread == NULL)
return -ENOTSUP;