aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/route.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:09:09 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:35 -0400
commit7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf (patch)
tree51d86a4cb01cf5735b18c36ca62471f8c759a041 /sound/core/oss/route.c
parent5ef03460a6ffc1d3ee6b6f2abc6765d3e224cf89 (diff)
ALSA: Kill snd_assert() in sound/core/*
Kill snd_assert() in sound/core/*, 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/core/oss/route.c')
-rw-r--r--sound/core/oss/route.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/core/oss/route.c b/sound/core/oss/route.c
index da7ab7a3e82..0dcc2870d53 100644
--- a/sound/core/oss/route.c
+++ b/sound/core/oss/route.c
@@ -54,7 +54,8 @@ static snd_pcm_sframes_t route_transfer(struct snd_pcm_plugin *plugin,
54 struct snd_pcm_plugin_channel *dvp; 54 struct snd_pcm_plugin_channel *dvp;
55 int format; 55 int format;
56 56
57 snd_assert(plugin != NULL && src_channels != NULL && dst_channels != NULL, return -ENXIO); 57 if (snd_BUG_ON(!plugin || !src_channels || !dst_channels))
58 return -ENXIO;
58 if (frames == 0) 59 if (frames == 0)
59 return 0; 60 return 0;
60 61
@@ -90,10 +91,13 @@ int snd_pcm_plugin_build_route(struct snd_pcm_substream *plug,
90 struct snd_pcm_plugin *plugin; 91 struct snd_pcm_plugin *plugin;
91 int err; 92 int err;
92 93
93 snd_assert(r_plugin != NULL, return -ENXIO); 94 if (snd_BUG_ON(!r_plugin))
95 return -ENXIO;
94 *r_plugin = NULL; 96 *r_plugin = NULL;
95 snd_assert(src_format->rate == dst_format->rate, return -ENXIO); 97 if (snd_BUG_ON(src_format->rate != dst_format->rate))
96 snd_assert(src_format->format == dst_format->format, return -ENXIO); 98 return -ENXIO;
99 if (snd_BUG_ON(src_format->format != dst_format->format))
100 return -ENXIO;
97 101
98 err = snd_pcm_plugin_build(plug, "route conversion", 102 err = snd_pcm_plugin_build(plug, "route conversion",
99 src_format, dst_format, 0, &plugin); 103 src_format, dst_format, 0, &plugin);