@@ -2674,8 +2674,7 @@ int soc_dpcm_runtime_update(struct snd_soc_card *card)
if (paths < 0) {
dev_warn(fe->dev, "ASoC: %s no valid %s path\n",
fe->dai_link->name, "playback");
- mutex_unlock(&card->mutex);
- return paths;
+ goto unlock;
}
/* update any new playback paths */
@@ -2710,8 +2709,7 @@ int soc_dpcm_runtime_update(struct snd_soc_card *card)
if (paths < 0) {
dev_warn(fe->dev, "ASoC: %s no valid %s path\n",
fe->dai_link->name, "capture");
- mutex_unlock(&card->mutex);
- return paths;
+ goto unlock;
}
/* update any new capture paths */
@@ -2733,8 +2731,10 @@ int soc_dpcm_runtime_update(struct snd_soc_card *card)
dpcm_path_put(&list);
}
+ paths = 0;
+unlock:
mutex_unlock(&card->mutex);
- return 0;
+ return paths;
}
int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute)
{