diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-30 10:34:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-02 08:08:33 -0500 |
commit | 16aff769d73c6b66a79450d7218f31dc46962536 (patch) | |
tree | dad5f8dee4ce8b5be9aef3e5d6855be2e91e2e9a /sound/soc | |
parent | 6065abf5ce8ba0ad945d21255a1d581ca30f2e18 (diff) |
ASoC: Fix return value of ak4641_pcm_set_dai_fmt()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ak4641.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c index 266ebea2b65a..c4d165a4bddf 100644 --- a/sound/soc/codecs/ak4641.c +++ b/sound/soc/codecs/ak4641.c | |||
@@ -339,6 +339,7 @@ static int ak4641_pcm_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
339 | { | 339 | { |
340 | struct snd_soc_codec *codec = codec_dai->codec; | 340 | struct snd_soc_codec *codec = codec_dai->codec; |
341 | u8 btif; | 341 | u8 btif; |
342 | int ret; | ||
342 | 343 | ||
343 | /* interface format */ | 344 | /* interface format */ |
344 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 345 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
@@ -358,7 +359,11 @@ static int ak4641_pcm_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
358 | return -EINVAL; | 359 | return -EINVAL; |
359 | } | 360 | } |
360 | 361 | ||
361 | return snd_soc_update_bits(codec, AK4641_BTIF, (0x3 << 5), btif); | 362 | ret = snd_soc_update_bits(codec, AK4641_BTIF, (0x3 << 5), btif); |
363 | if (ret < 0) | ||
364 | return ret; | ||
365 | |||
366 | return 0; | ||
362 | } | 367 | } |
363 | 368 | ||
364 | static int ak4641_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai, | 369 | static int ak4641_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai, |