diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2013-03-10 20:58:21 +0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-11-11 16:34:42 +0300 |
commit | 030ee68b4938cb7fc0bad3f000c87fcc8364ad75 (patch) | |
tree | 5acb6484c7d5c2664db84d5b43bb999adfbd151b /sound | |
parent | ec7deb5897ca9b158713c8c06fb79769606dd7ce (diff) | |
download | linux-030ee68b4938cb7fc0bad3f000c87fcc8364ad75.tar.xz |
ASoC: wm_hubs: Silence reg_r and reg_l 'may be used uninitialized' warnings
commit 1f5353e765fe2a1168477bfe55e4dd7cdd96b477 upstream.
Return an error from wm_hubs_read_dc_servo() if hubs->dcs_readback_mode is not
correctly initialized. You might as well bail out since nothing is likely to
work correctly afterwards.
sound/soc/codecs/wm_hubs.c:321:11: warning: 'reg_r' may be used uninitialized in this function [-Wuninitialized]
sound/soc/codecs/wm_hubs.c:251:13: note: 'reg_r' was declared here
sound/soc/codecs/wm_hubs.c:322:11: warning: 'reg_l' may be used uninitialized in this function [-Wuninitialized]
sound/soc/codecs/wm_hubs.c:251:6: note: 'reg_l' was declared here
gcc version 4.6.3
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
[bwh: Backported to 3.2: There's no separate wm_hubs_read_dc_servo() function,
so return directly from calibrate_dc_servo().]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index e44c0e3a89b6..3b26d443507d 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -173,7 +173,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec) break; default: WARN(1, "Unknown DCS readback method\n"); - break; + return; } dev_dbg(codec->dev, "DCS input: %x %x\n", reg_l, reg_r); |