aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2007-05-21 08:20:04 -0400
committerDave Jones <davej@redhat.com>2007-05-29 16:56:40 -0400
commit0a4b2ccc555fa2ca6873d60219047104e4805d45 (patch)
tree3641776d5ad881047b5fa3ff64f55ab427c85a40 /drivers/cpufreq/cpufreq.c
parent489dc5cb18932d3cedaef03e84890475db17a843 (diff)
[CPUFREQ] check return value of sysfs_create_file
Eliminate build warning (sysfs_create_file return value must be checked) Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index eb37fba9b7ef..0521427a571e 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -826,13 +826,18 @@ 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 if (sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)))
830 goto err_out_driver_exit;
830 drv_attr++; 831 drv_attr++;
831 } 832 }
832 if (cpufreq_driver->get) 833 if (cpufreq_driver->get){
833 sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); 834 if (sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr))
834 if (cpufreq_driver->target) 835 goto err_out_driver_exit;
835 sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); 836 }
837 if (cpufreq_driver->target){
838 if (sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr))
839 goto err_out_driver_exit;
840 }
836 841
837 spin_lock_irqsave(&cpufreq_driver_lock, flags); 842 spin_lock_irqsave(&cpufreq_driver_lock, flags);
838 for_each_cpu_mask(j, policy->cpus) { 843 for_each_cpu_mask(j, policy->cpus) {