summaryrefslogtreecommitdiff
path: root/sound/soc/hisilicon
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2017-04-11 12:15:16 -0700
committerMark Brown <broonie@kernel.org>2017-04-11 21:20:44 +0100
commitda13d7462b013ab58129fe20bfb3acb3aa73e07e (patch)
treef04a42dcf4e26ca6a118fbc9261c5c534fe6d03b /sound/soc/hisilicon
parent86666c083a4eacb798754f2485bbecfedc9fc7d7 (diff)
ASoC: hisilicon: Add error returns even for cases that shouldn't happen.
This patch addresses feedback from Mark Brown, adding a few extra error returns in cases that shouldn't happen Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/hisilicon')
-rw-r--r--sound/soc/hisilicon/hi6210-i2s.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/hisilicon/hi6210-i2s.c b/sound/soc/hisilicon/hi6210-i2s.c
index 45691b70060c..1909bfc6950a 100644
--- a/sound/soc/hisilicon/hi6210-i2s.c
+++ b/sound/soc/hisilicon/hi6210-i2s.c
@@ -395,6 +395,7 @@ static int hi6210_i2s_hw_params(struct snd_pcm_substream *substream,
break;
default:
WARN_ONCE(1, "Invalid i2s->fmt MASTER_MASK. This shouldn't happen\n");
+ return -EINVAL;
}
switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) {
@@ -409,6 +410,7 @@ static int hi6210_i2s_hw_params(struct snd_pcm_substream *substream,
break;
default:
WARN_ONCE(1, "Invalid i2s->fmt FORMAT_MASK. This shouldn't happen\n");
+ return -EINVAL;
}
val = hi6210_read_reg(i2s, HII2S_I2S_CFG);