aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq-cpu0.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 4e5b7fb8927c..37d23a0f8c56 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -178,10 +178,16 @@ static struct cpufreq_driver cpu0_cpufreq_driver = {
178 178
179static int cpu0_cpufreq_probe(struct platform_device *pdev) 179static int cpu0_cpufreq_probe(struct platform_device *pdev)
180{ 180{
181 struct device_node *np; 181 struct device_node *np, *parent;
182 int ret; 182 int ret;
183 183
184 for_each_child_of_node(of_find_node_by_path("/cpus"), np) { 184 parent = of_find_node_by_path("/cpus");
185 if (!parent) {
186 pr_err("failed to find OF /cpus\n");
187 return -ENOENT;
188 }
189
190 for_each_child_of_node(parent, np) {
185 if (of_get_property(np, "operating-points", NULL)) 191 if (of_get_property(np, "operating-points", NULL))
186 break; 192 break;
187 } 193 }