Skip to content
Snippets Groups Projects
Unverified Commit 38cc0334 authored by Su Hui's avatar Su Hui Committed by Mark Brown
Browse files

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: default avatarSu Hui <suhui@nfschina.com>
Link: https://patch.msgid.link/20240911115448.277828-1-suhui@nfschina.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c6b9a922
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment