aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sof/ipc4-topology.c9
-rw-r--r--sound/soc/sunxi/sun50i-dmic.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index 66bbe101680c..a81af5f73a4b 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -1543,9 +1543,16 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
msg->data_ptr = ipc_data;
ret = sof_ipc_tx_message(sdev->ipc, msg, ipc_size, NULL, 0);
- if (ret < 0)
+ if (ret < 0) {
dev_err(sdev->dev, "failed to create module %s\n", swidget->widget->name);
+ if (swidget->id != snd_soc_dapm_scheduler) {
+ struct sof_ipc4_fw_module *fw_module = swidget->module_info;
+
+ ida_free(&fw_module->m_ida, swidget->instance_id);
+ }
+ }
+
return ret;
}
diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c
index cd3c07f2070f..86cff5a5b1bd 100644
--- a/sound/soc/sunxi/sun50i-dmic.c
+++ b/sound/soc/sunxi/sun50i-dmic.c
@@ -59,7 +59,7 @@ struct dmic_rate {
unsigned int rate_bit;
};
-const static struct dmic_rate dmic_rate_s[] = {
+static const struct dmic_rate dmic_rate_s[] = {
{48000, 0x0},
{44100, 0x0},
{32000, 0x1},