From 9d8dbf80cfb6bccecdfd5262399a3cb7c9806d8a Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Tue, 14 Jan 2025 19:52:23 +0800 Subject: [PATCH] fixup! ASoC: SOF: debug_dsp_ops: Add op to test DSP power state changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by analyzer-use-of-uninitialized-value sound/soc/sof/debug-dsp-ops.c:216:19: error: use of uninitialized value ‘string’ [CWE-457] [-Werror=analyzer-use-of-uninitialized-value] The ‘string’ will not be assigned in the default case of switch (sdev->dsp_power_state.state) and (sdev->dsp_power_state.substate). Signed-off-by: Bard Liao --- sound/soc/sof/debug-dsp-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/debug-dsp-ops.c b/sound/soc/sof/debug-dsp-ops.c index e111fe1246e528..3a78b123ca8505 100644 --- a/sound/soc/sof/debug-dsp-ops.c +++ b/sound/soc/sof/debug-dsp-ops.c @@ -177,8 +177,8 @@ static ssize_t sof_dsp_ops_tester_dfs_read(struct file *file, char __user *buffe { struct snd_sof_dfsentry *dfse = file->private_data; struct snd_sof_dev *sdev = dfse->sdev; + const char *string = NULL; struct dentry *dentry; - const char *string; size_t size_ret; /* return the FW filename or path */