summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2024-02-27 10:00:42 +0000
committerMark Brown <broonie@kernel.org>2024-02-27 12:57:29 +0000
commitcb9d8a2c6cb7cbb0fc919defe4fae741bfcae9de (patch)
tree8a4e091ca947d98e266787d0c69fe8a4a85c17d8 /Documentation
parentb86143776573c2276a6e5b5ec99e92b12297a9d5 (diff)
downloadlinux-stable-cb9d8a2c6cb7cbb0fc919defe4fae741bfcae9de.tar.gz
linux-stable-cb9d8a2c6cb7cbb0fc919defe4fae741bfcae9de.tar.bz2
linux-stable-cb9d8a2c6cb7cbb0fc919defe4fae741bfcae9de.zip
ASoC: cs35l56: Prevent bad sign extension in cs35l56_read_silicon_uid()
Cast u8 values to u32 when using them to build a 32-bit unsigned value that is then stored in a u64. This avoids the possibility of a bad sign extension where the u8 is implicitly extended to an int, thus changing it from an unsigned to a signed value. Whether this is a real problem is debatable, but it does no harm to ensure that the u8 are cast to a suitable type for shifting. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: e1830f66f6c6 ("ASoC: cs35l56: Add helper functions for amp calibration") Link: https://msgid.link/r/20240227100042.99-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions