aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/riptide
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/riptide
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/riptide')
-rw-r--r--sound/pci/riptide/riptide.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 6a3596247348..124f9a2f1535 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -865,7 +865,8 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm,
865 struct riptideport *hwport; 865 struct riptideport *hwport;
866 struct cmdport *cmdport = NULL; 866 struct cmdport *cmdport = NULL;
867 867
868 snd_assert(cif, return -EINVAL); 868 if (snd_BUG_ON(!cif))
869 return -EINVAL;
869 870
870 hwport = cif->hwport; 871 hwport = cif->hwport;
871 if (cif->errcnt > MAX_ERROR_COUNT) { 872 if (cif->errcnt > MAX_ERROR_COUNT) {
@@ -1490,7 +1491,8 @@ static int snd_riptide_prepare(struct snd_pcm_substream *substream)
1490 int err = 0; 1491 int err = 0;
1491 snd_pcm_format_t format; 1492 snd_pcm_format_t format;
1492 1493
1493 snd_assert(cif && data, return -EINVAL); 1494 if (snd_BUG_ON(!cif || !data))
1495 return -EINVAL;
1494 1496
1495 snd_printdd("prepare id %d ch: %d f:0x%x r:%d\n", data->id, 1497 snd_printdd("prepare id %d ch: %d f:0x%x r:%d\n", data->id,
1496 runtime->channels, runtime->format, runtime->rate); 1498 runtime->channels, runtime->format, runtime->rate);
@@ -1772,7 +1774,8 @@ snd_riptide_codec_write(struct snd_ac97 *ac97, unsigned short reg,
1772 union cmdret rptr = CMDRET_ZERO; 1774 union cmdret rptr = CMDRET_ZERO;
1773 int i = 0; 1775 int i = 0;
1774 1776
1775 snd_assert(cif, return); 1777 if (snd_BUG_ON(!cif))
1778 return;
1776 1779
1777 snd_printdd("Write AC97 reg 0x%x 0x%x\n", reg, val); 1780 snd_printdd("Write AC97 reg 0x%x 0x%x\n", reg, val);
1778 do { 1781 do {
@@ -1790,7 +1793,8 @@ static unsigned short snd_riptide_codec_read(struct snd_ac97 *ac97,
1790 struct cmdif *cif = chip->cif; 1793 struct cmdif *cif = chip->cif;
1791 union cmdret rptr = CMDRET_ZERO; 1794 union cmdret rptr = CMDRET_ZERO;
1792 1795
1793 snd_assert(cif, return 0); 1796 if (snd_BUG_ON(!cif))
1797 return 0;
1794 1798
1795 if (SEND_RACR(cif, reg, &rptr) != 0) 1799 if (SEND_RACR(cif, reg, &rptr) != 0)
1796 SEND_RACR(cif, reg, &rptr); 1800 SEND_RACR(cif, reg, &rptr);
@@ -1804,7 +1808,8 @@ static int snd_riptide_initialize(struct snd_riptide *chip)
1804 unsigned int device_id; 1808 unsigned int device_id;
1805 int err; 1809 int err;
1806 1810
1807 snd_assert(chip, return -EINVAL); 1811 if (snd_BUG_ON(!chip))
1812 return -EINVAL;
1808 1813
1809 cif = chip->cif; 1814 cif = chip->cif;
1810 if (!cif) { 1815 if (!cif) {
@@ -1836,7 +1841,8 @@ static int snd_riptide_free(struct snd_riptide *chip)
1836{ 1841{
1837 struct cmdif *cif; 1842 struct cmdif *cif;
1838 1843
1839 snd_assert(chip, return 0); 1844 if (!chip)
1845 return 0;
1840 1846
1841 if ((cif = chip->cif)) { 1847 if ((cif = chip->cif)) {
1842 SET_GRESET(cif->hwport); 1848 SET_GRESET(cif->hwport);