aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0521427a571e..0db9e1bda322 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -826,16 +826,19 @@ 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 if (sysfs_create_file(&policy->kobj, &((*drv_attr)->attr))) 829 ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
830 if (ret)
830 goto err_out_driver_exit; 831 goto err_out_driver_exit;
831 drv_attr++; 832 drv_attr++;
832 } 833 }
833 if (cpufreq_driver->get){ 834 if (cpufreq_driver->get){
834 if (sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr)) 835 ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr);
836 if (ret)
835 goto err_out_driver_exit; 837 goto err_out_driver_exit;
836 } 838 }
837 if (cpufreq_driver->target){ 839 if (cpufreq_driver->target){
838 if (sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr)) 840 ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr);
841 if (ret)
839 goto err_out_driver_exit; 842 goto err_out_driver_exit;
840 } 843 }
841 844