]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56-shared-test: Fix possible null pointer dereference
authorEthan Tidmore <ethantidmore06@gmail.com>
Sat, 23 May 2026 21:15:22 +0000 (16:15 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 26 May 2026 15:37:13 +0000 (16:37 +0100)
commit4fa26292e8dcfd6f466cb7d62067b037b006190e
treead18c452e8329fd7d86753f84481a9848fd444ed
parentb0ffc4b644de2442ad7826720b87a345815704ef
ASoC: cs35l56-shared-test: Fix possible null pointer dereference

The struct regmap_config is dereferenced before its check. Also, after
it is checked priv->reg_offset is assigned to regmap_config->reg_base,
making the removed line redundant.

Detected by Smatch:
sound/soc/codecs/cs35l56-shared-test.c:681 cs35l56_shared_test_case_base_init()
warn: variable dereferenced before check 'regmap_config' (see line 665)

Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Link: https://patch.msgid.link/20260523211522.522616-1-ethantidmore06@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56-shared-test.c