diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:14 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:38 -0400 |
commit | da3cec35dd3c31d8706db4bf379372ce70d92118 (patch) | |
tree | 9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/echoaudio/midi.c | |
parent | 622207dc31895b4e82c39100db8635d885c795e2 (diff) |
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/echoaudio/midi.c')
-rw-r--r-- | sound/pci/echoaudio/midi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c index 91f5bff66d3f..77bf2a83d997 100644 --- a/sound/pci/echoaudio/midi.c +++ b/sound/pci/echoaudio/midi.c | |||
@@ -59,7 +59,8 @@ static int enable_midi_input(struct echoaudio *chip, char enable) | |||
59 | Returns how many actually written or < 0 on error */ | 59 | Returns how many actually written or < 0 on error */ |
60 | static int write_midi(struct echoaudio *chip, u8 *data, int bytes) | 60 | static int write_midi(struct echoaudio *chip, u8 *data, int bytes) |
61 | { | 61 | { |
62 | snd_assert(bytes > 0 && bytes < MIDI_OUT_BUFFER_SIZE, return -EINVAL); | 62 | if (snd_BUG_ON(bytes <= 0 || bytes >= MIDI_OUT_BUFFER_SIZE)) |
63 | return -EINVAL; | ||
63 | 64 | ||
64 | if (wait_handshake(chip)) | 65 | if (wait_handshake(chip)) |
65 | return -EIO; | 66 | return -EIO; |
@@ -119,7 +120,8 @@ static int midi_service_irq(struct echoaudio *chip) | |||
119 | /* The count is at index 0, followed by actual data */ | 120 | /* The count is at index 0, followed by actual data */ |
120 | count = le16_to_cpu(chip->comm_page->midi_input[0]); | 121 | count = le16_to_cpu(chip->comm_page->midi_input[0]); |
121 | 122 | ||
122 | snd_assert(count < MIDI_IN_BUFFER_SIZE, return 0); | 123 | if (snd_BUG_ON(count >= MIDI_IN_BUFFER_SIZE)) |
124 | return 0; | ||
123 | 125 | ||
124 | /* Get the MIDI data from the comm page */ | 126 | /* Get the MIDI data from the comm page */ |
125 | i = 1; | 127 | i = 1; |