mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
ASoC: mediatek: mt9195-mt6359: fix UNINIT problem
Coverity shows using uninitialized value monitor. When regmap_read returns an error, monitor keeps the value left from earlier computation. To prevent from the unexpected result in the case, assign 0 to monitor. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20230307040938.7484-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ff72889906
commit
1a3f0116b7
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ static int mt8195_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
|
|||
int mtkaif_phase_cycle[MT8195_MTKAIF_MISO_NUM];
|
||||
int mtkaif_calibration_num_phase;
|
||||
bool mtkaif_calibration_ok;
|
||||
unsigned int monitor;
|
||||
unsigned int monitor = 0;
|
||||
int counter;
|
||||
int phase;
|
||||
int i;
|
||||
|
|
Loading…
Reference in a new issue