aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/indigo_dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/echoaudio/indigo_dsp.c')
-rw-r--r--sound/pci/echoaudio/indigo_dsp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/echoaudio/indigo_dsp.c b/sound/pci/echoaudio/indigo_dsp.c
index d6ac7734609e..f05e39f7aad9 100644
--- a/sound/pci/echoaudio/indigo_dsp.c
+++ b/sound/pci/echoaudio/indigo_dsp.c
@@ -39,7 +39,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
39 int err; 39 int err;
40 40
41 DE_INIT(("init_hw() - Indigo\n")); 41 DE_INIT(("init_hw() - Indigo\n"));
42 snd_assert((subdevice_id & 0xfff0) == INDIGO, return -ENODEV); 42 if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO))
43 return -ENODEV;
43 44
44 if ((err = init_dsp_comm_page(chip))) { 45 if ((err = init_dsp_comm_page(chip))) {
45 DE_INIT(("init_hw - could not initialize DSP comm page\n")); 46 DE_INIT(("init_hw - could not initialize DSP comm page\n"));
@@ -143,8 +144,9 @@ static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe,
143{ 144{
144 int index; 145 int index;
145 146
146 snd_assert(pipe < num_pipes_out(chip) && 147 if (snd_BUG_ON(pipe >= num_pipes_out(chip) ||
147 output < num_busses_out(chip), return -EINVAL); 148 output >= num_busses_out(chip)))
149 return -EINVAL;
148 150
149 if (wait_handshake(chip)) 151 if (wait_handshake(chip))
150 return -EIO; 152 return -EIO;