[alsa-devel] [PATCH 4/4] SOUND: wm8900, use uninitialized_var(fll_div)

Jiri Slaby jirislaby at gmail.com
Tue Aug 25 22:59:37 CEST 2009


To avoid a wrong compiler warning, use unitialized_var(fll_div) in
wm8900_set_fll.

If fll_div members are unitialized, we return before their use due to
error.

Signed-off-by: Jiri Slaby <jirislaby at gmail.com>
Cc: Takashi Iwai <tiwai at suse.de>
Cc: Jaroslav Kysela <perex at perex.cz>
---
 sound/soc/codecs/wm8900.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 5e9c855..255210a 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -747,7 +747,7 @@ static int wm8900_set_fll(struct snd_soc_codec *codec,
 	int fll_id, unsigned int freq_in, unsigned int freq_out)
 {
 	struct wm8900_priv *wm8900 = codec->private_data;
-	struct _fll_div fll_div;
+	struct _fll_div uninitialized_var(fll_div);
 	unsigned int reg;
 
 	if (wm8900->fll_in == freq_in && wm8900->fll_out == freq_out)
-- 
1.6.3.3



More information about the Alsa-devel mailing list