alsabat: fix one uninitialized warning issue

Fix a variable uninitialized issue, adding the initialized assignment to fix it.

Signed-off-by: Zhang Keqiao <keqiaox.k.zhang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Zhang Keqiao 2017-08-30 09:26:16 +08:00 committed by Takashi Iwai
parent 1c9adf46b8
commit dbd4fc84f8

View file

@ -34,7 +34,7 @@ static void check_amplitude(struct bat *bat, float *buf)
int i, percent; int i, percent;
/* calculate average value */ /* calculate average value */
for (i = 0, sum = 0.0; i < bat->frames; i++) for (i = 0, sum = 0.0, average = 0.0; i < bat->frames; i++)
sum += buf[i]; sum += buf[i];
average = sum / bat->frames; average = sum / bat->frames;