ASoC: soc-core: add comment for rtd freeing
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Mar 2021 05:26:28 +0000 (14:26 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 31 Mar 2021 17:02:22 +0000 (18:02 +0100)
commitf1b3ee789f4b7a41ad93ff42d4efbae607622ae7
tree624bd88000e3a4e6e5f5fdcce159ab0238e2b388
parentad858508fd6ac58258dd25fd2063a6f6e10426f7
ASoC: soc-core: add comment for rtd freeing

We don't need to mind freeing for rtd,
because it was created from devm_kzalloc(dev, xxx) which is rtd->dev.

This means, if rtd->dev was freed, rtd will be also freed
automatically.

soc_new_pcm_runtime(...)
{
...
rtd = devm_kzalloc(dev, ...);
rtd->dev = dev;
...
}

This explanation was missing at soc_free_pcm_runtime() comment.
This patch indicates it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg4dxldn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c