We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5faaa03 commit f5c3ef2Copy full SHA for f5c3ef2
drivers/cpufreq/cpufreq-cpu0.c
@@ -178,10 +178,16 @@ static struct cpufreq_driver cpu0_cpufreq_driver = {
178
179
static int cpu0_cpufreq_probe(struct platform_device *pdev)
180
{
181
- struct device_node *np;
+ struct device_node *np, *parent;
182
int ret;
183
184
- for_each_child_of_node(of_find_node_by_path("/cpus"), np) {
+ 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) {
191
if (of_get_property(np, "operating-points", NULL))
192
break;
193
}
0 commit comments