|
@@ -22,11 +22,15 @@ static const struct of_device_id tegra_machine_match[] = {
|
|
|
|
|
|
|
|
bool soc_is_tegra(void)
|
|
bool soc_is_tegra(void)
|
|
|
{
|
|
{
|
|
|
|
|
+ const struct of_device_id *match;
|
|
|
struct device_node *root;
|
|
struct device_node *root;
|
|
|
|
|
|
|
|
root = of_find_node_by_path("/");
|
|
root = of_find_node_by_path("/");
|
|
|
if (!root)
|
|
if (!root)
|
|
|
return false;
|
|
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;
|
|
|
}
|
|
}
|