Skip to content

Commit c6f597b

Browse files
morimotobroonie
authored andcommitted
ASoC: audio-graph-card2: remove unneeded of_node_get()
"lnk" is used as "port0", and it will be used to get "port1" by of_get_next_child(ports, lnk). It will call of_node_put() inside. This function is calling of_node_get() to make up for it, but it doesn't call paired of_node_put(port0) when it quit function. This of_node_get() itself is not needed, let's remove it. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 188d804 commit c6f597b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

sound/soc/generic/audio-graph-card2.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,6 @@ static int graph_count_c2c(struct simple_util_priv *priv,
12031203
struct device_node *codec0 = of_graph_get_remote_port(ep0);
12041204
struct device_node *codec1 = of_graph_get_remote_port(ep1);
12051205

1206-
of_node_get(lnk);
1207-
12081206
/*
12091207
* codec2codec {
12101208
* ports {

0 commit comments

Comments
 (0)