diff options
author | Amol Lad <amol@verismonetworks.com> | 2006-10-17 00:32:55 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-10-18 00:08:55 -0400 |
commit | 3e74341c7b356ce142ace4e9b5ff08448c9f320e (patch) | |
tree | 0059b8f4eabe5c8e2eaacbf2ee7d724b2d8cf361 /arch | |
parent | dfde5d62ed9b28b0bda676c16e8cb635df244ef2 (diff) |
[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 <amol@verismonetworks.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 ef457d50f4ac..b8fb4b521c62 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 = { | |||
153 | static int __init sc520_freq_init(void) | 153 | static int __init sc520_freq_init(void) |
154 | { | 154 | { |
155 | struct cpuinfo_x86 *c = cpu_data; | 155 | struct cpuinfo_x86 *c = cpu_data; |
156 | int err; | ||
156 | 157 | ||
157 | /* Test if we have the right hardware */ | 158 | /* Test if we have the right hardware */ |
158 | if(c->x86_vendor != X86_VENDOR_AMD || | 159 | if(c->x86_vendor != X86_VENDOR_AMD || |
@@ -166,7 +167,11 @@ static int __init sc520_freq_init(void) | |||
166 | return -ENOMEM; | 167 | return -ENOMEM; |
167 | } | 168 | } |
168 | 169 | ||
169 | return cpufreq_register_driver(&sc520_freq_driver); | 170 | err = cpufreq_register_driver(&sc520_freq_driver); |
171 | if (err) | ||
172 | iounmap(cpuctl); | ||
173 | |||
174 | return err; | ||
170 | } | 175 | } |
171 | 176 | ||
172 | 177 | ||