Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58a7295bc8073b9e668c329cb9ceb5b668c2b15d
Commit:     58a7295bc8073b9e668c329cb9ceb5b668c2b15d
Parent:     ea48761519bd40d7a881c587b5f3177664b2987e
Author:     Tobias Klauser <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 14 00:28:15 2007 +0200
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Thu Jun 21 12:57:54 2007 -0400

    [CPUFREQ] Fix sysfs_create_file return value handling
    
    Commit 0a4b2ccc555fa2ca6873d60219047104e4805d45 in cpufreq.git
    eliminates the build warnings but does not pass on the error code of
    sysfs_create_file to the function calling cpufreq_add_dev. Instead some
    previous value of ret would be returned.
    
    Signed-off-by: Tobias Klauser <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
---
 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 0521427..0db9e1b 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;
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to