aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ak4531_codec.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/ak4531_codec.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/ak4531_codec.c')
-rw-r--r--sound/pci/ak4531_codec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/ak4531_codec.c b/sound/pci/ak4531_codec.c
index 33d37b1c42fc..0f819ddb3ebf 100644
--- a/sound/pci/ak4531_codec.c
+++ b/sound/pci/ak4531_codec.c
@@ -392,9 +392,10 @@ int __devinit snd_ak4531_mixer(struct snd_card *card,
392 .dev_free = snd_ak4531_dev_free, 392 .dev_free = snd_ak4531_dev_free,
393 }; 393 };
394 394
395 snd_assert(rak4531 != NULL, return -EINVAL); 395 if (snd_BUG_ON(!card || !_ak4531))
396 *rak4531 = NULL; 396 return -EINVAL;
397 snd_assert(card != NULL && _ak4531 != NULL, return -EINVAL); 397 if (rak4531)
398 *rak4531 = NULL;
398 ak4531 = kzalloc(sizeof(*ak4531), GFP_KERNEL); 399 ak4531 = kzalloc(sizeof(*ak4531), GFP_KERNEL);
399 if (ak4531 == NULL) 400 if (ak4531 == NULL)
400 return -ENOMEM; 401 return -ENOMEM;
@@ -428,7 +429,8 @@ int __devinit snd_ak4531_mixer(struct snd_card *card,
428#if 0 429#if 0
429 snd_ak4531_dump(ak4531); 430 snd_ak4531_dump(ak4531);
430#endif 431#endif
431 *rak4531 = ak4531; 432 if (rak4531)
433 *rak4531 = ak4531;
432 return 0; 434 return 0;
433} 435}
434 436