From 1e70f3a4bf3cfc525dd5041bb833200502d4cca3 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 17 Jul 2009 21:53:49 +0100 Subject: [PATCH] --- yaml --- r: 157583 b: refs/heads/master c: 8aa2df53088f024b13cb005956bd6da94cc1fd2d h: refs/heads/master i: 157581: 308807de146e08b68b20cf41576a8e8ddb9ff068 157579: bcd8c6ede83e8da6d3055a7fb844066b2ef5f49a 157575: ee108165a34c199844b1698b831360b838ece9d9 157567: 913456e04b6ec0476514e61a26e6bd7031841ba3 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm8400.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 44cbf4511874..47c58cf6bfe9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c5910a703889cf44ac1aa9405642a7d3b5bc6f24 +refs/heads/master: 8aa2df53088f024b13cb005956bd6da94cc1fd2d diff --git a/trunk/sound/soc/codecs/wm8400.c b/trunk/sound/soc/codecs/wm8400.c index 0bf903f27564..b9ef4d915221 100644 --- a/trunk/sound/soc/codecs/wm8400.c +++ b/trunk/sound/soc/codecs/wm8400.c @@ -1022,10 +1022,15 @@ static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, if (freq_in == wm8400->fll_in && freq_out == wm8400->fll_out) return 0; - if (freq_out != 0) { + if (freq_out) { ret = fll_factors(wm8400, &factors, freq_in, freq_out); if (ret != 0) return ret; + } else { + /* Bodge GCC 4.4.0 uninitialised variable warning - it + * doesn't seem capable of working out that we exit if + * freq_out is 0 before any of the uses. */ + memset(&factors, 0, sizeof(factors)); } wm8400->fll_out = freq_out; @@ -1040,7 +1045,7 @@ static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, reg &= ~WM8400_FLL_OSC_ENA; wm8400_write(codec, WM8400_FLL_CONTROL_1, reg); - if (freq_out == 0) + if (!freq_out) return 0; reg &= ~(WM8400_FLL_REF_FREQ | WM8400_FLL_FRATIO_MASK);