提交 0a4b2ccc 编写于 作者: T Thomas Renninger 提交者: Dave Jones

[CPUFREQ] check return value of sysfs_create_file

Eliminate build warning (sysfs_create_file return value must be checked)
Signed-off-by: NThomas Renninger <trenn@suse.de>
Signed-off-by: NDave Jones <davej@redhat.com>
上级 489dc5cb
...@@ -826,13 +826,18 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) ...@@ -826,13 +826,18 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
/* set up files for this cpu device */ /* set up files for this cpu device */
drv_attr = cpufreq_driver->attr; drv_attr = cpufreq_driver->attr;
while ((drv_attr) && (*drv_attr)) { while ((drv_attr) && (*drv_attr)) {
sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)); if (sysfs_create_file(&policy->kobj, &((*drv_attr)->attr)))
goto err_out_driver_exit;
drv_attr++; drv_attr++;
} }
if (cpufreq_driver->get) if (cpufreq_driver->get){
sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr); if (sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr))
if (cpufreq_driver->target) goto err_out_driver_exit;
sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr); }
if (cpufreq_driver->target){
if (sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr))
goto err_out_driver_exit;
}
spin_lock_irqsave(&cpufreq_driver_lock, flags); spin_lock_irqsave(&cpufreq_driver_lock, flags);
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask(j, policy->cpus) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册