Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sound/soc/sof/topology.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -721,6 +721,7 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
default:
dev_warn(sdev->dev, "control type not supported %d:%d:%d\n",
hdr->ops.get, hdr->ops.put, hdr->ops.info);
kfree(scontrol);
return 0;
}

Expand DownExpand Up@@ -1255,8 +1256,10 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
case snd_soc_dapm_dai_in:
case snd_soc_dapm_dai_out:
dai = kzalloc(sizeof(*dai), GFP_KERNEL);
if (!dai)
if (!dai) {
kfree(swidget);
return -ENOMEM;
}

ret = sof_widget_load_dai(scomp, index, swidget, tw, &reply,
dai);
Expand DownExpand Up@@ -1320,6 +1323,7 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
"error: DSP failed to add widget id %d type %d name : %s stream %s reply %d\n",
tw->shift, swidget->id, tw->name,
tw->sname ? tw->sname : "none", reply.rhdr.error);
kfree(swidget);
return ret;
}

Expand Down