]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - sound/soc/generic/simple-card-utils.c
Merge tag 'xfs-4.13-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[karo-tx-linux.git] / sound / soc / generic / simple-card-utils.c
index 26d64fa40c9cf1438f43a08d8f45b15ac0184fa9..7d7ab4aee42e3ab133926f2dc5b11489b93a28ae 100644 (file)
@@ -263,6 +263,9 @@ static int asoc_simple_card_get_dai_id(struct device_node *ep)
                        id = i;
                i++;
        }
+
+       of_node_put(node);
+
        if (id < 0)
                return -ENODEV;
 
@@ -282,11 +285,6 @@ int asoc_simple_card_parse_graph_dai(struct device_node *ep,
        if (!dai_name)
                return 0;
 
-       /*
-        * of_graph_get_port_parent() will call
-        * of_node_put(). So, call of_node_get() here
-        */
-       of_node_get(ep);
        node = of_graph_get_port_parent(ep);
 
        /* Get dai->name */