diff options
Diffstat (limited to 'drivers/oprofile/oprof.c')
-rw-r--r-- | drivers/oprofile/oprof.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c index 3cffce90f82a..ced39f602292 100644 --- a/drivers/oprofile/oprof.c +++ b/drivers/oprofile/oprof.c | |||
@@ -183,6 +183,10 @@ static int __init oprofile_init(void) | |||
183 | { | 183 | { |
184 | int err; | 184 | int err; |
185 | 185 | ||
186 | err = buffer_sync_init(); | ||
187 | if (err) | ||
188 | return err; | ||
189 | |||
186 | err = oprofile_arch_init(&oprofile_ops); | 190 | err = oprofile_arch_init(&oprofile_ops); |
187 | 191 | ||
188 | if (err < 0 || timer) { | 192 | if (err < 0 || timer) { |
@@ -191,8 +195,10 @@ static int __init oprofile_init(void) | |||
191 | } | 195 | } |
192 | 196 | ||
193 | err = oprofilefs_register(); | 197 | err = oprofilefs_register(); |
194 | if (err) | 198 | if (err) { |
195 | oprofile_arch_exit(); | 199 | oprofile_arch_exit(); |
200 | buffer_sync_cleanup(); | ||
201 | } | ||
196 | 202 | ||
197 | return err; | 203 | return err; |
198 | } | 204 | } |
@@ -202,6 +208,7 @@ static void __exit oprofile_exit(void) | |||
202 | { | 208 | { |
203 | oprofilefs_unregister(); | 209 | oprofilefs_unregister(); |
204 | oprofile_arch_exit(); | 210 | oprofile_arch_exit(); |
211 | buffer_sync_cleanup(); | ||
205 | } | 212 | } |
206 | 213 | ||
207 | 214 | ||