summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq-cpu0.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-04-30 12:30:24 +0200
committerMatt Fleming <matt.fleming@intel.com>2013-04-30 12:42:13 +0200
commita614e1923d5389d01f3545ee4a90e39a04d0c90d (patch)
treee8e32dba12a66ffd26d78f015a142ac28e19ad8e /drivers/cpufreq/cpufreq-cpu0.c
parentMerge remote-tracking branch 'efi/chainsaw' into x86/efi (diff)
parentLinux 3.9 (diff)
downloadlinux-a614e1923d5389d01f3545ee4a90e39a04d0c90d.tar.xz
linux-a614e1923d5389d01f3545ee4a90e39a04d0c90d.zip
Merge tag 'v3.9' into efi-for-tip2
Resolve conflicts for Ingo. Conflicts: drivers/firmware/Kconfig drivers/firmware/efivars.c Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq-cpu0.c')
-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 = {
static int cpu0_cpufreq_probe(struct platform_device *pdev)
{
- struct device_node *np;
+ struct device_node *np, *parent;
int ret;
- for_each_child_of_node(of_find_node_by_path("/cpus"), np) {
+ parent = of_find_node_by_path("/cpus");
+ if (!parent) {
+ pr_err("failed to find OF /cpus\n");
+ return -ENOENT;
+ }
+
+ for_each_child_of_node(parent, np) {
if (of_get_property(np, "operating-points", NULL))
break;
}