Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC: amd: ps: Fix uninitialized ret in create_acp64_platform_devs()
Clang warns: sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. ret is used uninitialized if 'goto de_init' is taken. As this is not an error nor should the ACP be deinitialized, just directly return 0 in this case statement, which resolves the warning. Fixes: 1d325cd ("ASoC: amd: ps: refactor platform device creation logic") Link: ClangBuiltLinux#1779 Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
- Loading branch information