Skip to content

Commit 71c6be1

Browse files
bardliaoujfalusi
authored andcommitted
fixup! ASoC: SOF: topology: allow user to add topologies
add a out of memory check. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent a3650a4 commit 71c6be1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sound/soc/sof/topology.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,6 +2595,10 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
25952595
tplg_filename_prefix,
25962596
feature_topologies[i]);
25972597

2598+
if (!feature_topology) {
2599+
ret = -ENOMEM;
2600+
goto out;
2601+
}
25982602
dev_info(scomp->dev, "loading feature topology %d: %s\n", i, feature_topology);
25992603
ret = request_firmware(&fw, feature_topology, scomp->dev);
26002604
if (ret < 0) {

0 commit comments

Comments
 (0)