aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c/other
diff options
context:
space:
mode:
Diffstat (limited to 'sound/i2c/other')
-rw-r--r--sound/i2c/other/ak4114.c3
-rw-r--r--sound/i2c/other/ak4117.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index d20d893b3b60..0341451f814c 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -475,7 +475,8 @@ int snd_ak4114_build(struct ak4114 *ak4114,
475 unsigned int idx; 475 unsigned int idx;
476 int err; 476 int err;
477 477
478 snd_assert(cap_substream, return -EINVAL); 478 if (snd_BUG_ON(!cap_substream))
479 return -EINVAL;
479 ak4114->playback_substream = ply_substream; 480 ak4114->playback_substream = ply_substream;
480 ak4114->capture_substream = cap_substream; 481 ak4114->capture_substream = cap_substream;
481 for (idx = 0; idx < AK4114_CONTROLS; idx++) { 482 for (idx = 0; idx < AK4114_CONTROLS; idx++) {
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index f350835ade96..2cad2d612518 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -431,7 +431,8 @@ int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substr
431 unsigned int idx; 431 unsigned int idx;
432 int err; 432 int err;
433 433
434 snd_assert(cap_substream, return -EINVAL); 434 if (snd_BUG_ON(!cap_substream))
435 return -EINVAL;
435 ak4117->substream = cap_substream; 436 ak4117->substream = cap_substream;
436 for (idx = 0; idx < AK4117_CONTROLS; idx++) { 437 for (idx = 0; idx < AK4117_CONTROLS; idx++) {
437 kctl = snd_ctl_new1(&snd_ak4117_iec958_controls[idx], ak4117); 438 kctl = snd_ctl_new1(&snd_ak4117_iec958_controls[idx], ak4117);