aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc/beep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:12:47 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:40 -0400
commit5e246b850df563224be26f1d409cf66fd6c968df (patch)
tree970e7faf60b86cb2c489a08ca506075c398165e5 /sound/ppc/beep.c
parentda3cec35dd3c31d8706db4bf379372ce70d92118 (diff)
ALSA: Kill snd_assert() in other places
Kill snd_assert() in other places, 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/ppc/beep.c')
-rw-r--r--sound/ppc/beep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/ppc/beep.c b/sound/ppc/beep.c
index baa2a7237370..89f5c328acfe 100644
--- a/sound/ppc/beep.c
+++ b/sound/ppc/beep.c
@@ -185,7 +185,8 @@ static int snd_pmac_get_beep(struct snd_kcontrol *kcontrol,
185 struct snd_ctl_elem_value *ucontrol) 185 struct snd_ctl_elem_value *ucontrol)
186{ 186{
187 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); 187 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
188 snd_assert(chip->beep, return -ENXIO); 188 if (snd_BUG_ON(!chip->beep))
189 return -ENXIO;
189 ucontrol->value.integer.value[0] = chip->beep->volume; 190 ucontrol->value.integer.value[0] = chip->beep->volume;
190 return 0; 191 return 0;
191} 192}
@@ -195,7 +196,8 @@ static int snd_pmac_put_beep(struct snd_kcontrol *kcontrol,
195{ 196{
196 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); 197 struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
197 unsigned int oval, nval; 198 unsigned int oval, nval;
198 snd_assert(chip->beep, return -ENXIO); 199 if (snd_BUG_ON(!chip->beep))
200 return -ENXIO;
199 oval = chip->beep->volume; 201 oval = chip->beep->volume;
200 nval = ucontrol->value.integer.value[0]; 202 nval = ucontrol->value.integer.value[0];
201 if (nval > 100) 203 if (nval > 100)