Skip to content

Commit

Permalink
ASoC: audio-graph-card2: remove unneeded of_node_get()
Browse files Browse the repository at this point in the history
"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 <dan.carpenter@linaro.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jzk3akoo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
morimoto authored and broonie committed May 9, 2024
1 parent 188d804 commit c6f597b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sound/soc/generic/audio-graph-card2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,6 @@ static int graph_count_c2c(struct simple_util_priv *priv,
struct device_node *codec0 = of_graph_get_remote_port(ep0);
struct device_node *codec1 = of_graph_get_remote_port(ep1);

of_node_get(lnk);

/*
* codec2codec {
* ports {
Expand Down

0 comments on commit c6f597b

Please sign in to comment.