Make sure to unlock the DAPM mutex when dapm_widget_list_create() fails.
This means the function will now generate a trace_snd_soc_dapm_connected
event, even if the creation of the list fails. But that was the behavior
before the patch that introduced the unlock issue, so that should be fine.
Fixes: 1ce43acff0c0 ("ASoC: dapm: Simplify list creation in dapm_dai_get_connected_widgets()")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
ret = dapm_widget_list_create(list, &widgets);
if (ret)
- return ret;
+ paths = ret;
trace_snd_soc_dapm_connected(paths, stream);
mutex_unlock(&card->dapm_mutex);