aboutsummaryrefslogtreecommitdiff
path: root/sound/core/oss/route.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-12 12:49:27 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-12 12:49:27 +0200
commit1389ac4b976abdc0555280dfc1aa2c3abcc19641 (patch)
tree1ec51aa0b1e33201f6f4f3bebc657f9ec65f8539 /sound/core/oss/route.c
parent69e13ad56f9e2cd81c4f8bfd6267211c10c14c08 (diff)
parentfd048088306656824958e7783ffcee27e241b361 (diff)
Merge branch 'linus' into x86/signal
Conflicts: arch/x86/kernel/signal_64.c
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,
struct snd_pcm_plugin_channel *dvp;
int format;
- snd_assert(plugin != NULL && src_channels != NULL && dst_channels != NULL, return -ENXIO);
+ if (snd_BUG_ON(!plugin || !src_channels || !dst_channels))
+ return -ENXIO;
if (frames == 0)
return 0;
@@ -90,10 +91,13 @@ int snd_pcm_plugin_build_route(struct snd_pcm_substream *plug,
struct snd_pcm_plugin *plugin;
int err;
- snd_assert(r_plugin != NULL, return -ENXIO);
+ if (snd_BUG_ON(!r_plugin))
+ return -ENXIO;
*r_plugin = NULL;
- snd_assert(src_format->rate == dst_format->rate, return -ENXIO);
- snd_assert(src_format->format == dst_format->format, return -ENXIO);
+ if (snd_BUG_ON(src_format->rate != dst_format->rate))
+ return -ENXIO;
+ if (snd_BUG_ON(src_format->format != dst_format->format))
+ return -ENXIO;
err = snd_pcm_plugin_build(plug, "route conversion",
src_format, dst_format, 0, &plugin);