aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/gina20_dsp.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-17 12:20:26 -0400
committerArjan van de Ven <arjan@linux.intel.com>2008-10-17 12:20:26 -0400
commit651dab4264e4ba0e563f5ff56f748127246e9065 (patch)
tree016630974bdcb00fe529b673f96d389e0fd6dc94 /sound/pci/echoaudio/gina20_dsp.c
parent40b8606253552109815786e5d4b0de98782d31f5 (diff)
parent2e532d68a2b3e2aa6b19731501222069735c741c (diff)
Merge commit 'linus/master' into merge-linus
Conflicts: arch/x86/kvm/i8254.c
Diffstat (limited to 'sound/pci/echoaudio/gina20_dsp.c')
-rw-r--r--sound/pci/echoaudio/gina20_dsp.c6
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 !) */
178static int set_input_gain(struct echoaudio *chip, u16 input, int gain) 179static 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;