aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDomagoj Trsan <domagoj.trsan@gmail.com>2014-09-20 08:40:38 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-24 02:41:25 -0400
commitd1d1a9d3a104531e25b7a33d60b627e93700327f (patch)
treef4ae1adf06506f0d6dc2e2470a8e5c1c90201b84
parentc74920124750e5270c689d8c892a1c4263e5a547 (diff)
staging: line6: fix midibuf.c coding style issue
Fix the following checkpatch.pl warning: - else is not generally useful after a break or return Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/line6/midibuf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/staging/line6/midibuf.c b/drivers/staging/line6/midibuf.c
index f0adb7baa603..1ff856989fd6 100644
--- a/drivers/staging/line6/midibuf.c
+++ b/drivers/staging/line6/midibuf.c
@@ -15,11 +15,14 @@
15 15
16static int midibuf_message_length(unsigned char code) 16static int midibuf_message_length(unsigned char code)
17{ 17{
18 int message_length;
19
18 if (code < 0x80) 20 if (code < 0x80)
19 return -1; 21 message_length = -1;
20 else if (code < 0xf0) { 22 else if (code < 0xf0) {
21 static const int length[] = { 3, 3, 3, 3, 2, 2, 3 }; 23 static const int length[] = { 3, 3, 3, 3, 2, 2, 3 };
22 return length[(code >> 4) - 8]; 24
25 message_length = length[(code >> 4) - 8];
23 } else { 26 } else {
24 /* 27 /*
25 Note that according to the MIDI specification 0xf2 is 28 Note that according to the MIDI specification 0xf2 is
@@ -29,8 +32,10 @@ static int midibuf_message_length(unsigned char code)
29 static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1, 32 static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1,
30 1, 1, 1, -1, 1, 1 33 1, 1, 1, -1, 1, 1
31 }; 34 };
32 return length[code & 0x0f]; 35 message_length = length[code & 0x0f];
33 } 36 }
37
38 return message_length;
34} 39}
35 40
36static int midibuf_is_empty(struct midi_buffer *this) 41static int midibuf_is_empty(struct midi_buffer *this)