Commit 6ec7cbc7 authored by Su Hui's avatar Su Hui Committed by Greg Kroah-Hartman
Browse files

ASoC: codecs: avoid possible garbage value in peb2466_reg_read()



[ Upstream commit 38cc0334 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 86238603
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment