projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
273d235
)
USB: gadget: midi: fix range check in f_midi_out_open()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 18 Oct 2011 06:24:36 +0000
(09:24 +0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 18 Oct 2011 20:51:35 +0000
(13:51 -0700)
! 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@oracle.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_midi.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_midi.c
b/drivers/usb/gadget/f_midi.c
index 44858dc074d3893cdad06d0f8b87c965b9aa43c2..ef1bc7a174efaf1b66f4d48720f25be1b02ac5b0 100644
(file)
--- 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__);