]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: q6dsp: Undo buggy warning fix
authorNathan Chancellor <nathan@kernel.org>
Tue, 11 May 2021 19:03:06 +0000 (12:03 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 12 May 2021 12:02:52 +0000 (13:02 +0100)
commit89fa2ba0b06859e44ba21b5ed4ec221c731d1071
tree0310f42e670564cfc9ce734a5f188ac36feff603
parent85871398f3bb93eee7d283f0b8eb3f43366c073f
ASoC: q6dsp: Undo buggy warning fix

This reverts commit 8141391e417a2a91b8c34df8d6ab22a0acf6868f.

The warnings that commit 8141391e417a ("ASoC: q6dsp: q6afe: remove
unneeded dead-store initialization") was trying to fix were already
fixed in commit 01e09c4ee228 ("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: 8141391e417a ("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>
sound/soc/qcom/qdsp6/q6afe.c