summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/adav80x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-16 04:34:58 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-17 06:15:20 +0200
commitca1004bab9c6829e64036f7da5e25a698756ee28 (patch)
treecc7fa9199cddbe119c75654331f36fea2cd26142 /sound/soc/codecs/adav80x.c
parentASoC: Handle failed WM8994 FLL lock waits (diff)
downloadlinux-ca1004bab9c6829e64036f7da5e25a698756ee28.tar.xz
linux-ca1004bab9c6829e64036f7da5e25a698756ee28.zip
ASoC: Report an error for unknown adav80x formats
Not only fixes error handling but also some uninitialized variable warnings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'sound/soc/codecs/adav80x.c')
-rw-r--r--sound/soc/codecs/adav80x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index e30fba62392d..300c04b70e71 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -456,7 +456,7 @@ static int adav80x_set_capture_pcm_format(struct snd_soc_codec *codec,
val = ADAV80X_CAPTURE_WORD_LEN24;
break;
default:
- break;
+ return -EINVAL;
}
snd_soc_update_bits(codec, adav80x_port_ctrl_regs[dai->id][0],
@@ -488,7 +488,7 @@ static int adav80x_set_playback_pcm_format(struct snd_soc_codec *codec,
val = ADAV80X_PLAYBACK_MODE_RIGHT_J_24;
break;
default:
- break;
+ return -EINVAL;
}
snd_soc_update_bits(codec, adav80x_port_ctrl_regs[dai->id][1],