diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 16:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 16:42:43 -0400 |
commit | 702ed6ef375c19d65f2eeeefd3851476f2c4cee4 (patch) | |
tree | fe46588dcc716f64a04310797d9446573614d3fc /drivers/cpufreq/cpufreq.c | |
parent | 2f41fc806434f8466bb361570589a3f6099ca65d (diff) | |
parent | 58a7295bc8073b9e668c329cb9ceb5b668c2b15d (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Fix sysfs_create_file return value handling
[CPUFREQ] ondemand: fix tickless accounting and software coordination bug
[CPUFREQ] ondemand: add a check to avoid negative load calculation
[CPUFREQ] Keep userspace governor quiet when it is not being used
[CPUFREQ] Longhaul - Proper register access
[CPUFREQ] Kconfig powernow-k8 driver should depend on ACPI P-States driver
[CPUFREQ] Longhaul - Replace ACPI functions with direct I/O
[CPUFREQ] Longhaul - Remove duplicate multipliers
[CPUFREQ] Longhaul - Embedded "conservative"
[CPUFREQ] acpi-cpufreq: Proper ReadModifyWrite of PERF_CTL MSR
[CPUFREQ] check return value of sysfs_create_file
[CPUFREQ] Longhaul - Check ACPI "BM DMA in progress" bit
[CPUFREQ] Longhaul - Move old_ratio to correct place
[CPUFREQ] Longhaul - VT8237 support
[CPUFREQ] Longhaul - Use all kinds of support
[CPUFREQ] powernow-k8: clarify number of cores.
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index eb37fba9b7ef..0db9e1bda322 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -826,13 +826,21 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
826 | /* set up files for this cpu device */ | 826 | /* set up files for this cpu device */ |
827 | drv_attr = cpufreq_driver->attr; | 827 | drv_attr = cpufreq_driver->attr; |
828 | while ((drv_attr) && (*drv_attr)) { | 828 | while ((drv_attr) && (*drv_attr)) { |
829 | sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)); | 829 | ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)); |
830 | if (ret) | ||
831 | goto err_out_driver_exit; | ||
830 | drv_attr++; | 832 | drv_attr++; |
831 | } | 833 | } |
832 | if (cpufreq_driver->get) | 834 | if (cpufreq_driver->get){ |
833 | sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); | 835 | ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); |
834 | if (cpufreq_driver->target) | 836 | if (ret) |
835 | sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); | 837 | goto err_out_driver_exit; |
838 | } | ||
839 | if (cpufreq_driver->target){ | ||
840 | ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); | ||
841 | if (ret) | ||
842 | goto err_out_driver_exit; | ||
843 | } | ||
836 | 844 | ||
837 | spin_lock_irqsave(&cpufreq_driver_lock, flags); | 845 | spin_lock_irqsave(&cpufreq_driver_lock, flags); |
838 | for_each_cpu_mask(j, policy->cpus) { | 846 | for_each_cpu_mask(j, policy->cpus) { |