diff options
Diffstat (limited to 'sound/pci/echoaudio/gina20_dsp.c')
-rw-r--r-- | sound/pci/echoaudio/gina20_dsp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/echoaudio/gina20_dsp.c b/sound/pci/echoaudio/gina20_dsp.c index 2757c8960843..db6c952e9d7f 100644 --- a/sound/pci/echoaudio/gina20_dsp.c +++ b/sound/pci/echoaudio/gina20_dsp.c | |||
@@ -38,7 +38,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) | |||
38 | int err; | 38 | int err; |
39 | 39 | ||
40 | DE_INIT(("init_hw() - Gina20\n")); | 40 | DE_INIT(("init_hw() - Gina20\n")); |
41 | snd_assert((subdevice_id & 0xfff0) == GINA20, return -ENODEV); | 41 | if (snd_BUG_ON((subdevice_id & 0xfff0) != GINA20)) |
42 | return -ENODEV; | ||
42 | 43 | ||
43 | if ((err = init_dsp_comm_page(chip))) { | 44 | if ((err = init_dsp_comm_page(chip))) { |
44 | DE_INIT(("init_hw - could not initialize DSP comm page\n")); | 45 | DE_INIT(("init_hw - could not initialize DSP comm page\n")); |
@@ -177,7 +178,8 @@ static int set_input_clock(struct echoaudio *chip, u16 clock) | |||
177 | /* Set input bus gain (one unit is 0.5dB !) */ | 178 | /* Set input bus gain (one unit is 0.5dB !) */ |
178 | static int set_input_gain(struct echoaudio *chip, u16 input, int gain) | 179 | static int set_input_gain(struct echoaudio *chip, u16 input, int gain) |
179 | { | 180 | { |
180 | snd_assert(input < num_busses_in(chip), return -EINVAL); | 181 | if (snd_BUG_ON(input >= num_busses_in(chip))) |
182 | return -EINVAL; | ||
181 | 183 | ||
182 | if (wait_handshake(chip)) | 184 | if (wait_handshake(chip)) |
183 | return -EIO; | 185 | return -EIO; |