]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/oprofile/oprof.c
OMAP1: clock: Typo fix for clock in omap1
[linux-2.6-omap-h63xx.git] / drivers / oprofile / oprof.c
index 3cffce90f82a9693999bb16c5741b6c2e4e842c2..ced39f602292b2b8328fbc64cb705d8504768ac8 100644 (file)
@@ -183,6 +183,10 @@ static int __init oprofile_init(void)
 {
        int err;
 
+       err = buffer_sync_init();
+       if (err)
+               return err;
+
        err = oprofile_arch_init(&oprofile_ops);
 
        if (err < 0 || timer) {
@@ -191,8 +195,10 @@ static int __init oprofile_init(void)
        }
 
        err = oprofilefs_register();
-       if (err)
+       if (err) {
                oprofile_arch_exit();
+               buffer_sync_cleanup();
+       }
 
        return err;
 }
@@ -202,6 +208,7 @@ static void __exit oprofile_exit(void)
 {
        oprofilefs_unregister();
        oprofile_arch_exit();
+       buffer_sync_cleanup();
 }