Skip to content

Commit 9b74934

Browse files
nathanchancebroonie
authored andcommitted
ASoC: q6dsp: Undo buggy warning fix
This reverts commit 5f1b95d. The warnings that commit 5f1b95d ("ASoC: q6dsp: q6afe: remove unneeded dead-store initialization") was trying to fix were already fixed in commit 12900ba ("ASoC: qcom: q6afe: remove useless assignments"). With both commits in the tree, port_id is uninitialized, as pointed out by clang: sound/soc/qcom/qdsp6/q6afe.c:1213:18: warning: variable 'port_id' is uninitialized when used here [-Wuninitialized] stop->port_id = port_id; ^~~~~~~ sound/soc/qcom/qdsp6/q6afe.c:1186:13: note: initialize the variable 'port_id' to silence this warning int port_id; ^ = 0 1 warning generated. Bring back the initialization so that everything works as intended. Fixes: 5f1b95d ("ASoC: q6dsp: q6afe: remove unneeded dead-store initialization") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20210511190306.2418917-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 7fe0b09 commit 9b74934

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/qcom/qdsp6/q6afe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ int q6afe_port_stop(struct q6afe_port *port)
11831183
struct afe_port_cmd_device_stop *stop;
11841184
struct q6afe *afe = port->afe;
11851185
struct apr_pkt *pkt;
1186-
int port_id;
1186+
int port_id = port->id;
11871187
int ret = 0;
11881188
int index, pkt_size;
11891189
void *p;

0 commit comments

Comments
 (0)