ASoC: codecs: avoid possible garbage value in peb2466_reg_read()
Clang static checker (scan-build) warning: sound/soc/codecs/peb2466.c:232:8: Assigned value is garbage or undefined [core.uninitialized.Assign] 232 | *val = tmp; | ^ ~~~ When peb2466_read_byte() fails, 'tmp' will have a garbage value. Add a judgemnet to avoid this problem. Fixes: 227f609c ("ASoC: codecs: Add support for the Infineon PEB2466 codec") Signed-off-by: Su Hui <suhui@nfschina.com> Link: https://patch.msgid.link/20240911115448.277828-1-suhui@nfschina.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment