On Tue, Jan 05, 2016 at 02:55:31PM +0100, Michal Nazarewicz wrote: > @@ -568,12 +568,12 @@ static int f_midi_in_open(struct snd_rawmidi_substream *substream) > { > struct f_midi *midi = substream->rmidi->private_data; > > - if (!midi->in_port[substream->number]) > + if (substream->number > midi->in_ports) This is off by one. It should be >= midi->in_ports. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html