summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Tidmore <ethantidmore06@gmail.com>2026-05-24 00:15:22 +0300
committerMark Brown <broonie@kernel.org>2026-05-26 18:37:13 +0300
commit4fa26292e8dcfd6f466cb7d62067b037b006190e (patch)
treead18c452e8329fd7d86753f84481a9848fd444ed
parentb0ffc4b644de2442ad7826720b87a345815704ef (diff)
downloadlinux-4fa26292e8dcfd6f466cb7d62067b037b006190e.tar.xz
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>
-rw-r--r--sound/soc/codecs/cs35l56-shared-test.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs35l56-shared-test.c b/sound/soc/codecs/cs35l56-shared-test.c
index 5b2b915559a9..4f52c8a192e5 100644
--- a/sound/soc/codecs/cs35l56-shared-test.c
+++ b/sound/soc/codecs/cs35l56-shared-test.c
@@ -662,7 +662,6 @@ static int cs35l56_shared_test_case_base_init(struct kunit *test, u8 type, u8 re
test->priv = priv;
priv->test = test;
- priv->reg_offset = regmap_config->reg_base;
/* Create dummy amp driver dev */
priv->amp_dev = faux_device_create("cs35l56_shared_test_drv", NULL, NULL);