summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-30 19:36:23 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-02 17:08:40 +0400
commit748b217827974d34a7341142599f0db631a3e45a (patch)
treef81e43c72677779730491bfa22f1c8092c3ebfe9 /sound
parentc49c7f0cf91c8506d0a0ed61227a0da3b243384d (diff)
downloadlinux-748b217827974d34a7341142599f0db631a3e45a.tar.xz
ASoC: Fix return value of wm8580_set_sysclk()
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')
-rw-r--r--sound/soc/codecs/wm8580.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index b1c8d3de08b2..211285164d70 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -670,7 +670,7 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
{
struct snd_soc_codec *codec = dai->codec;
struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
- int sel, sel_mask, sel_shift;
+ int ret, sel, sel_mask, sel_shift;
switch (dai->driver->id) {
case WM8580_DAI_PAIFRX:
@@ -711,7 +711,11 @@ static int wm8580_set_sysclk(struct snd_soc_dai *dai, int clk_id,
/* We really should validate PLL settings but not yet */
wm8580->sysclk[dai->driver->id] = freq;
- return snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel);
+ ret = snd_soc_update_bits(codec, WM8580_CLKSEL, sel_mask, sel);
+ if (ret < 0)
+ return ret;
+
+ return 0;
}
static int wm8580_digital_mute(struct snd_soc_dai *codec_dai, int mute)