From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> ! has higher precedence than >= and since neither 0 nor 1 are greater than 8 the condition is always false. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Acked-by: Daniel Mack <zonque@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/usb/gadget/f_midi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c index 44858dc..ef1bc7a 100644 --- a/drivers/usb/gadget/f_midi.c +++ b/drivers/usb/gadget/f_midi.c @@ -644,7 +644,7 @@ static int f_midi_out_open(struct snd_rawmidi_substream *substream) { struct f_midi *midi = substream->rmidi->private_data; - if (!substream->number >= MAX_PORTS) + if (substream->number >= MAX_PORTS) return -EINVAL; VDBG(midi, "%s()\n", __func__); -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html