aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cmipci.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:12:14 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:38 -0400
commitda3cec35dd3c31d8706db4bf379372ce70d92118 (patch)
tree9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/cmipci.c
parent622207dc31895b4e82c39100db8635d885c795e2 (diff)
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, 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/pci/cmipci.c')
-rw-r--r--sound/pci/cmipci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 9971b5b7735b..1a74ca62c314 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -2357,7 +2357,8 @@ static int snd_cmipci_uswitch_get(struct snd_kcontrol *kcontrol,
2357{ 2357{
2358 struct cmipci_switch_args *args; 2358 struct cmipci_switch_args *args;
2359 args = (struct cmipci_switch_args *)kcontrol->private_value; 2359 args = (struct cmipci_switch_args *)kcontrol->private_value;
2360 snd_assert(args != NULL, return -EINVAL); 2360 if (snd_BUG_ON(!args))
2361 return -EINVAL;
2361 return _snd_cmipci_uswitch_get(kcontrol, ucontrol, args); 2362 return _snd_cmipci_uswitch_get(kcontrol, ucontrol, args);
2362} 2363}
2363 2364
@@ -2401,7 +2402,8 @@ static int snd_cmipci_uswitch_put(struct snd_kcontrol *kcontrol,
2401{ 2402{
2402 struct cmipci_switch_args *args; 2403 struct cmipci_switch_args *args;
2403 args = (struct cmipci_switch_args *)kcontrol->private_value; 2404 args = (struct cmipci_switch_args *)kcontrol->private_value;
2404 snd_assert(args != NULL, return -EINVAL); 2405 if (snd_BUG_ON(!args))
2406 return -EINVAL;
2405 return _snd_cmipci_uswitch_put(kcontrol, ucontrol, args); 2407 return _snd_cmipci_uswitch_put(kcontrol, ucontrol, args);
2406} 2408}
2407 2409
@@ -2662,7 +2664,8 @@ static int __devinit snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_devic
2662 unsigned int idx; 2664 unsigned int idx;
2663 int err; 2665 int err;
2664 2666
2665 snd_assert(cm != NULL && cm->card != NULL, return -EINVAL); 2667 if (snd_BUG_ON(!cm || !cm->card))
2668 return -EINVAL;
2666 2669
2667 card = cm->card; 2670 card = cm->card;
2668 2671