]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/soc/tegra/common.c
Merge branch 'next/drivers' into next/late
[mirror_ubuntu-focal-kernel.git] / drivers / soc / tegra / common.c
index cd8f41351addfdd69432d4d6e7d5136be4b28e68..7bfb154d6fa5ebe3ed6a78b38dd5177430801e3a 100644 (file)
@@ -22,11 +22,15 @@ static const struct of_device_id tegra_machine_match[] = {
 
 bool soc_is_tegra(void)
 {
+       const struct of_device_id *match;
        struct device_node *root;
 
        root = of_find_node_by_path("/");
        if (!root)
                return false;
 
-       return of_match_node(tegra_machine_match, root) != NULL;
+       match = of_match_node(tegra_machine_match, root);
+       of_node_put(root);
+
+       return match != NULL;
 }