Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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: [email protected]

…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 <[email protected]>
Cc: [email protected]
@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