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>
This commit is contained in:
Domagoj Trsan 2014-09-20 14:40:38 +02:00 committed by Greg Kroah-Hartman
parent c749201247
commit d1d1a9d3a1

View File

@ -15,11 +15,14 @@
static int midibuf_message_length(unsigned char code) static int midibuf_message_length(unsigned char code)
{ {
int message_length;
if (code < 0x80) if (code < 0x80)
return -1; message_length = -1;
else if (code < 0xf0) { else if (code < 0xf0) {
static const int length[] = { 3, 3, 3, 3, 2, 2, 3 }; static const int length[] = { 3, 3, 3, 3, 2, 2, 3 };
return length[(code >> 4) - 8];
message_length = length[(code >> 4) - 8];
} else { } else {
/* /*
Note that according to the MIDI specification 0xf2 is Note that according to the MIDI specification 0xf2 is
@ -29,8 +32,10 @@ static int midibuf_message_length(unsigned char code)
static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1, static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1,
1, 1, 1, -1, 1, 1 1, 1, 1, -1, 1, 1
}; };
return length[code & 0x0f]; message_length = length[code & 0x0f];
} }
return message_length;
} }
static int midibuf_is_empty(struct midi_buffer *this) static int midibuf_is_empty(struct midi_buffer *this)