summaryrefslogtreecommitdiff
path: root/drivers/soc/tegra/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/soc/tegra/common.c')
-rw-r--r--drivers/soc/tegra/common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/soc/tegra/common.c b/drivers/soc/tegra/common.c
index cd8f41351add..7bfb154d6fa5 100644
--- a/drivers/soc/tegra/common.c
+++ b/drivers/soc/tegra/common.c
@@ -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;
}