diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-11 07:45:22 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-11 07:45:22 -0400 |
commit | 4e83998f5af010a928495988c586ea2926624db9 (patch) | |
tree | e72d346172a30bbee165d7f585784724906da416 /arch/arm/oprofile/common.c | |
parent | dd1d3a49db4ae5c6afffadaff526b96c7993c7dd (diff) | |
parent | d4cfa4d12f46e2520f4c1d1a92e891ce068b7464 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'arch/arm/oprofile/common.c')
-rw-r--r-- | arch/arm/oprofile/common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 0691176899ff..72e09eb642dd 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -102,6 +102,7 @@ static int op_create_counter(int cpu, int event) | |||
102 | if (IS_ERR(pevent)) { | 102 | if (IS_ERR(pevent)) { |
103 | ret = PTR_ERR(pevent); | 103 | ret = PTR_ERR(pevent); |
104 | } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { | 104 | } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { |
105 | perf_event_release_kernel(pevent); | ||
105 | pr_warning("oprofile: failed to enable event %d " | 106 | pr_warning("oprofile: failed to enable event %d " |
106 | "on CPU %d\n", event, cpu); | 107 | "on CPU %d\n", event, cpu); |
107 | ret = -EBUSY; | 108 | ret = -EBUSY; |
@@ -365,6 +366,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
365 | ret = init_driverfs(); | 366 | ret = init_driverfs(); |
366 | if (ret) { | 367 | if (ret) { |
367 | kfree(counter_config); | 368 | kfree(counter_config); |
369 | counter_config = NULL; | ||
368 | return ret; | 370 | return ret; |
369 | } | 371 | } |
370 | 372 | ||
@@ -402,7 +404,6 @@ void oprofile_arch_exit(void) | |||
402 | struct perf_event *event; | 404 | struct perf_event *event; |
403 | 405 | ||
404 | if (*perf_events) { | 406 | if (*perf_events) { |
405 | exit_driverfs(); | ||
406 | for_each_possible_cpu(cpu) { | 407 | for_each_possible_cpu(cpu) { |
407 | for (id = 0; id < perf_num_counters; ++id) { | 408 | for (id = 0; id < perf_num_counters; ++id) { |
408 | event = perf_events[cpu][id]; | 409 | event = perf_events[cpu][id]; |
@@ -413,8 +414,10 @@ void oprofile_arch_exit(void) | |||
413 | } | 414 | } |
414 | } | 415 | } |
415 | 416 | ||
416 | if (counter_config) | 417 | if (counter_config) { |
417 | kfree(counter_config); | 418 | kfree(counter_config); |
419 | exit_driverfs(); | ||
420 | } | ||
418 | } | 421 | } |
419 | #else | 422 | #else |
420 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 423 | int __init oprofile_arch_init(struct oprofile_operations *ops) |