Skip to contentSkip to conversation

Applied "ASoC: hisilicon: Add error returns even for cases that shouldn't happen." to the asoc tree

PATCH Mark Brown 1 participant 1 message Apr 11, 2017

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

The patch

ASoC: hisilicon: Add error returns even for cases that shouldn't happen.

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From da13d7462b013ab58129fe20bfb3acb3aa73e07e Mon Sep 17 00:00:00 2001

From: John Stultz <[email protected]>
Date: Tue, 11 Apr 2017 12:15:16 -0700
Subject: [PATCH] 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

---
 sound/soc/hisilicon/hi6210-i2s.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/hisilicon/hi6210-i2s.c +2 -0
index 45691b70060c..1909bfc6950a 100644
@@ -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);
Signature · 1 line
2.11.0