mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 18:00:02 -05:00
ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback
[ Upstream commit bd054ece7d9cdd88e900df6625e951a01d9f655e ]
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: c84836d7f6 ("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]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
2698fab038
commit
c537bd0732
1 changed files with 1 additions and 1 deletions
|
|
@ -266,7 +266,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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue