diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-19 22:57:38 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-19 22:57:38 -0400 |
commit | ffee72d4681c8777918268a96aef42bdeb6c367b (patch) | |
tree | 4baf91483886d561c198ed0524ab54b783273e86 /drivers/oprofile/oprof.c | |
parent | fb54d268329846aa13b2bc44a64d90e9b7131192 (diff) | |
parent | f72caf7e496465182eeda842ac66a5e75404ddf1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/oprofile/oprof.c')
-rw-r--r-- | drivers/oprofile/oprof.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c index dc8a0428260d..b336cd9ee7a1 100644 --- a/drivers/oprofile/oprof.c +++ b/drivers/oprofile/oprof.c | |||
@@ -253,22 +253,26 @@ static int __init oprofile_init(void) | |||
253 | int err; | 253 | int err; |
254 | 254 | ||
255 | err = oprofile_arch_init(&oprofile_ops); | 255 | err = oprofile_arch_init(&oprofile_ops); |
256 | |||
257 | if (err < 0 || timer) { | 256 | if (err < 0 || timer) { |
258 | printk(KERN_INFO "oprofile: using timer interrupt.\n"); | 257 | printk(KERN_INFO "oprofile: using timer interrupt.\n"); |
259 | oprofile_timer_init(&oprofile_ops); | 258 | err = oprofile_timer_init(&oprofile_ops); |
259 | if (err) | ||
260 | goto out_arch; | ||
260 | } | 261 | } |
261 | |||
262 | err = oprofilefs_register(); | 262 | err = oprofilefs_register(); |
263 | if (err) | 263 | if (err) |
264 | oprofile_arch_exit(); | 264 | goto out_arch; |
265 | return 0; | ||
265 | 266 | ||
267 | out_arch: | ||
268 | oprofile_arch_exit(); | ||
266 | return err; | 269 | return err; |
267 | } | 270 | } |
268 | 271 | ||
269 | 272 | ||
270 | static void __exit oprofile_exit(void) | 273 | static void __exit oprofile_exit(void) |
271 | { | 274 | { |
275 | oprofile_timer_exit(); | ||
272 | oprofilefs_unregister(); | 276 | oprofilefs_unregister(); |
273 | oprofile_arch_exit(); | 277 | oprofile_arch_exit(); |
274 | } | 278 | } |