Skip to content

Commit bd054ec

Browse files
hiss2018broonie
authored andcommitted
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: c84836d ("ASoC: meson: axg-card: use modern dai_link style") Signed-off-by: Jing Xiangfeng <[email protected]> Reviewed-by: Jerome Brunet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fe0a530 commit bd054ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/meson/axg-card.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card,
116116

117117
lb = &card->dai_link[*index + 1];
118118

119-
lb->name = kasprintf(GFP_KERNEL, "%s-lb", pad->name);
119+
lb->name = devm_kasprintf(card->dev, GFP_KERNEL, "%s-lb", pad->name);
120120
if (!lb->name)
121121
return -ENOMEM;
122122

0 commit comments

Comments
 (0)