mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 05:34:13 -05:00
ASoC: simple-card-utils: Don't use __free(device_node) at graph_util_parse_dai()
commit419d191810("ASoC: simple-card-utils: use __free(device_node) for device node") uses __free(device_node) for dlc->of_node, but we need to keep it while driver is in use. Don't use __free(device_node) in graph_util_parse_dai(). Fixes:419d191810("ASoC: simple-card-utils: use __free(device_node) for device node") Reported-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn> Reported-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn> Tested-by: Detlev Casanova <detlev.casanova@collabora.com> Link: https://patch.msgid.link/87eczisyhh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
658fb7fe8e
commit
de74ec718e
@@ -1077,6 +1077,7 @@ static int graph_get_dai_id(struct device_node *ep)
|
||||
int graph_util_parse_dai(struct device *dev, struct device_node *ep,
|
||||
struct snd_soc_dai_link_component *dlc, int *is_single_link)
|
||||
{
|
||||
struct device_node *node;
|
||||
struct of_phandle_args args = {};
|
||||
struct snd_soc_dai *dai;
|
||||
int ret;
|
||||
@@ -1084,7 +1085,7 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep,
|
||||
if (!ep)
|
||||
return 0;
|
||||
|
||||
struct device_node *node __free(device_node) = of_graph_get_port_parent(ep);
|
||||
node = of_graph_get_port_parent(ep);
|
||||
|
||||
/*
|
||||
* Try to find from DAI node
|
||||
@@ -1126,8 +1127,10 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep,
|
||||
* if he unbinded CPU or Codec.
|
||||
*/
|
||||
ret = snd_soc_get_dlc(&args, dlc);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
parse_dai_end:
|
||||
if (is_single_link)
|
||||
|
||||
Reference in New Issue
Block a user