summary refs log tree commit diff
path: root/sound/soc/sof/topology.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-04-05 10:29:12 +0100
committerMark Brown <broonie@kernel.org>2022-04-05 10:29:12 +0100
commit9a2c98418930c60e25b89a140c8b42a8cd6d84a6 (patch)
treebac0f7d760c299545b4abfb07e64f202fab6c73a /sound/soc/sof/topology.c
parent66e384d86ff533b3352a1f897c6bc7bf7f1adafe (diff)
parent0b3d5d2e358ca6772fc3662fca27acb12a682fbf (diff)
downloadlinux-9a2c98418930c60e25b89a140c8b42a8cd6d84a6.tar.gz
ASoC: Pull in fixes
cs35l41 is getting some active work and conflicts, plus some of the
fixes are needed for my testing.

Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/topology.c')
-rw-r--r--sound/soc/sof/topology.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index e47a64934c04..f7e1de860931 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -952,11 +952,13 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
 	default:
 		dev_warn(scomp->dev, "control type not supported %d:%d:%d\n",
 			 hdr->ops.get, hdr->ops.put, hdr->ops.info);
+		kfree(scontrol->name);
 		kfree(scontrol);
 		return 0;
 	}
 
 	if (ret < 0) {
+		kfree(scontrol->name);
 		kfree(scontrol);
 		return ret;
 	}
@@ -1391,6 +1393,7 @@ static int sof_widget_unload(struct snd_soc_component *scomp,
 		}
 		kfree(scontrol->ipc_control_data);
 		list_del(&scontrol->list);
+		kfree(scontrol->name);
 		kfree(scontrol);
 	}