ASoC: rsnd: Add of_node_put() before return
Subsystems (3)
PATCH 1/1 ASoC: rsnd: Add of_node_put() before return
Fix following coccicheck warning:
./sound/soc/sh/rcar/core.c:1223:1-23: WARNING: Function for_each_child_of_node should have of_node_put() before return
Early exits from for_each_child_of_node should decrement the node reference counter.
Signed-off-by Wan Jiabing <[email protected]>
--- sound/soc/sh/rcar/core.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/sh/rcar/core.c +1 -0
@@ -1225,6 +1225,7 @@ int rsnd_node_count(struct rsnd_priv *priv, struct device_node *node, char *nameif (i <0 ) {dev_err (dev,"strange node numbering (%s)" ,of_node_full_name (node)); +of_node_put (np);return 0 ; } i++;
Signature · 1 line
2.20.1