diff options
Diffstat (limited to 'sound/pci/echoaudio/mia_dsp.c')
-rw-r--r-- | sound/pci/echoaudio/mia_dsp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/pci/echoaudio/mia_dsp.c b/sound/pci/echoaudio/mia_dsp.c index 891c70519096..227386602f9b 100644 --- a/sound/pci/echoaudio/mia_dsp.c +++ b/sound/pci/echoaudio/mia_dsp.c | |||
@@ -42,7 +42,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) | |||
42 | int err; | 42 | int err; |
43 | 43 | ||
44 | DE_INIT(("init_hw() - Mia\n")); | 44 | DE_INIT(("init_hw() - Mia\n")); |
45 | snd_assert((subdevice_id & 0xfff0) == MIA, return -ENODEV); | 45 | if (snd_BUG_ON((subdevice_id & 0xfff0) != MIA)) |
46 | return -ENODEV; | ||
46 | 47 | ||
47 | if ((err = init_dsp_comm_page(chip))) { | 48 | if ((err = init_dsp_comm_page(chip))) { |
48 | DE_INIT(("init_hw - could not initialize DSP comm page\n")); | 49 | DE_INIT(("init_hw - could not initialize DSP comm page\n")); |
@@ -161,8 +162,9 @@ static int set_sample_rate(struct echoaudio *chip, u32 rate) | |||
161 | static int set_input_clock(struct echoaudio *chip, u16 clock) | 162 | static int set_input_clock(struct echoaudio *chip, u16 clock) |
162 | { | 163 | { |
163 | DE_ACT(("set_input_clock(%d)\n", clock)); | 164 | DE_ACT(("set_input_clock(%d)\n", clock)); |
164 | snd_assert(clock == ECHO_CLOCK_INTERNAL || clock == ECHO_CLOCK_SPDIF, | 165 | if (snd_BUG_ON(clock != ECHO_CLOCK_INTERNAL && |
165 | return -EINVAL); | 166 | clock != ECHO_CLOCK_SPDIF)) |
167 | return -EINVAL; | ||
166 | 168 | ||
167 | chip->input_clock = clock; | 169 | chip->input_clock = clock; |
168 | return set_sample_rate(chip, chip->sample_rate); | 170 | return set_sample_rate(chip, chip->sample_rate); |
@@ -176,8 +178,9 @@ static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, | |||
176 | { | 178 | { |
177 | int index; | 179 | int index; |
178 | 180 | ||
179 | snd_assert(pipe < num_pipes_out(chip) && | 181 | if (snd_BUG_ON(pipe >= num_pipes_out(chip) || |
180 | output < num_busses_out(chip), return -EINVAL); | 182 | output >= num_busses_out(chip))) |
183 | return -EINVAL; | ||
181 | 184 | ||
182 | if (wait_handshake(chip)) | 185 | if (wait_handshake(chip)) |
183 | return -EIO; | 186 | return -EIO; |