]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/regulator/of_regulator.c
Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git...
[thirdparty/linux.git] / drivers / regulator / of_regulator.c
index 397918ebba550a5c120481052ba586db7cb9f055..9112faa6a9a0e12830e8f931e83fcd56070e1ac5 100644 (file)
@@ -416,8 +416,10 @@ device_node *regulator_of_get_init_node(struct device *dev,
                if (!name)
                        name = child->name;
 
-               if (!strcmp(desc->of_match, name))
+               if (!strcmp(desc->of_match, name)) {
+                       of_node_put(search);
                        return of_node_get(child);
+               }
        }
 
        of_node_put(search);