diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 9 |
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) /* set up files for this cpu device */ drv_attr = cpufreq_driver->attr; while ((drv_attr) && (*drv_attr)) { - if (sysfs_create_file(&policy->kobj, &((*drv_attr)->attr))) + ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)); + if (ret) goto err_out_driver_exit; drv_attr++; } if (cpufreq_driver->get){ - if (sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr)) + ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); + if (ret) goto err_out_driver_exit; } if (cpufreq_driver->target){ - if (sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr)) + ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); + if (ret) goto err_out_driver_exit; } |