diff options
author | Daniel Baluta | 2017-04-26 16:09:51 +0300 |
---|---|---|
committer | Mark Brown | 2017-04-30 22:14:27 +0900 |
commit | 66772eda0edbfbbbe7767a6b5d07e09dae84403d (patch) | |
tree | 52f10d0c2ddecb38a7040ab5b219537693e88767 /ipc | |
parent | 303e8954af8daa087e4f42788672d280337071ab (diff) |
ASoC: codec: wm9860: avoid maybe-uninitialized warning
The new PLL configuration code triggers a harmless warning:
sound/soc/codecs/wm8960.c: In function 'wm8960_configure_clocking':
sound/soc/codecs/wm8960.c:735:3: error: 'best_freq_out' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
wm8960_set_pll(codec, freq_in, best_freq_out);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/wm8960.c:699:12: note: 'best_freq_out' was declared
here
Fix this by reworking the code such that:
1) When there is no PLL freq available return -EINVAL and make
sure *bclk_idx, *dac_idx, *sysclk_idx are initialized with
invalid values.
2) When there is a PLL freq available initialize *bclk_idx,
*dac_idx and *sysclk_idx with correct values and immediately
return the freq available.
Fixes: 84fdc00d519f ("ASoC: codec: wm9860: Refactor PLL out freq search")
Fixes: 303e8954af8d ("ASoC: codec: wm8960: Stop when a matching PLL freq is found")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions