X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Fppc%2Fbeep.c;h=89f5c328acfe04952c1dcb4a2c0c66b0a16a70ea;hb=febb02bdfe5e2c6ceaa0a38d8b7afca3d98f415a;hp=baa2a7237370af2db7a0160e8bcc5502b82b945f;hpb=acf63867ae06ef95eea7bf445ded2f05528a81b1;p=karo-tx-linux.git 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, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); - snd_assert(chip->beep, return -ENXIO); + if (snd_BUG_ON(!chip->beep)) + return -ENXIO; ucontrol->value.integer.value[0] = chip->beep->volume; return 0; } @@ -195,7 +196,8 @@ static int snd_pmac_put_beep(struct snd_kcontrol *kcontrol, { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int oval, nval; - snd_assert(chip->beep, return -ENXIO); + if (snd_BUG_ON(!chip->beep)) + return -ENXIO; oval = chip->beep->volume; nval = ucontrol->value.integer.value[0]; if (nval > 100)