Skip to content

ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in crea…#5320

Merged
ranj063 merged 1 commit intothesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/sof-sdw-uninitialized-01
Feb 11, 2025
Merged

ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in crea…#5320
ranj063 merged 1 commit intothesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/sof-sdw-uninitialized-01

Conversation

@ujfalusi
Copy link
Collaborator

@ujfalusi ujfalusi commented Feb 4, 2025

…te_sdw_dailinks()

Initialize current_be_id to 0 to handle the unlikely case when there are no devices connected to a DAI.
In this case create_sdw_dailink() would return without touching the passed pointer to current_be_id.

Found by gcc -fanalyzer

Fixes: 59bf457 ("ASoC: intel: sof_sdw: Factor out SoundWire DAI creation")

Cc: stable@vger.kernel.org

…te_sdw_dailinks()

Initialize current_be_id to 0 to handle the unlikely case when there are
no devices connected to a DAI.
In this case create_sdw_dailink() would return without touching the passed
pointer to current_be_id.

Found by gcc -fanalyzer

Fixes: 59bf457 ("ASoC: intel: sof_sdw: Factor out SoundWire DAI creation")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: stable@vger.kernel.org
@ranj063 ranj063 merged commit 0d954c6 into thesofproject:topic/sof-dev Feb 11, 2025
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants