Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e74341c7b356ce142ace4e9b5ff08448c9f320e
Commit:     3e74341c7b356ce142ace4e9b5ff08448c9f320e
Parent:     dfde5d62ed9b28b0bda676c16e8cb635df244ef2
Author:     Amol Lad <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 17 10:02:55 2006 +0530
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Wed Oct 18 00:08:55 2006 -0400

    [CPUFREQ] sc520_freq.c: ioremap balanced with iounmap
    
    ioremap must be balanced by an iounmap and failing to do so can result
    in a memory leak.
    
    Tested (compilation only):
    - using allmodconfig
    - making sure the files are compiling without any warning/error due to
    new changes
    
    Signed-off-by: Amol Lad <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
---
 arch/i386/kernel/cpu/cpufreq/sc520_freq.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/i386/kernel/cpu/cpufreq/sc520_freq.c 
b/arch/i386/kernel/cpu/cpufreq/sc520_freq.c
index ef457d5..b8fb4b5 100644
--- a/arch/i386/kernel/cpu/cpufreq/sc520_freq.c
+++ b/arch/i386/kernel/cpu/cpufreq/sc520_freq.c
@@ -153,6 +153,7 @@ static struct cpufreq_driver sc520_freq_driver = {
 static int __init sc520_freq_init(void)
 {
        struct cpuinfo_x86 *c = cpu_data;
+       int err;
 
        /* Test if we have the right hardware */
        if(c->x86_vendor != X86_VENDOR_AMD ||
@@ -166,7 +167,11 @@ static int __init sc520_freq_init(void)
                return -ENOMEM;
        }
 
-       return cpufreq_register_driver(&sc520_freq_driver);
+       err = cpufreq_register_driver(&sc520_freq_driver);
+       if (err)
+               iounmap(cpuctl);
+
+       return err;
 }
 
 
-
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