summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorJing Xiangfeng <jingxiangfeng@huawei.com>2020-07-17 11:22:42 +0300
committerMark Brown <broonie@kernel.org>2020-07-17 15:58:30 +0300
commitbd054ece7d9cdd88e900df6625e951a01d9f655e (patch)
tree6d92622aa03d461f958a8ad7d6e5f2356917b4e8 /sound/soc
parentfe0a53044b4bce947045eadd7fa1adbc4685afab (diff)
downloadlinux-bd054ece7d9cdd88e900df6625e951a01d9f655e.tar.xz
ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback
axg_card_add_tdm_loopback() misses to call kfree() in an error path. We can use devm_kasprintf() to fix the issue, also improve maintainability. So use it instead. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200717082242.130627-1-jingxiangfeng@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/meson/axg-card.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
index 89f7f64747cd..47f2d93224fe 100644
--- a/sound/soc/meson/axg-card.c
+++ b/sound/soc/meson/axg-card.c
@@ -116,7 +116,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card,
lb = &card->dai_link[*index + 1];
- lb->name = kasprintf(GFP_KERNEL, "%s-lb", pad->name);
+ lb->name = devm_kasprintf(card->dev, GFP_KERNEL, "%s-lb", pad->name);
if (!lb->name)
return -ENOMEM;