aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorDaniel Baluta <[email protected]>2017-04-26 13:09:51 +0000
committerMark Brown <[email protected]>2017-04-30 13:14:27 +0000
commit66772eda0edbfbbbe7767a6b5d07e09dae84403d (patch)
tree52f10d0c2ddecb38a7040ab5b219537693e88767 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentASoC: codec: wm8960: Stop when a matching PLL freq is found (diff)
downloadkernel-66772eda0edbfbbbe7767a6b5d07e09dae84403d.tar.gz
kernel-66772eda0edbfbbbe7767a6b5d07e09dae84403d.zip
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 <[email protected]> Signed-off-by: Daniel Baluta <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions