diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-10-18 12:43:43 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-10-18 12:43:46 -0400 |
| commit | f2f108eb4511f22a6f7568090cfcf4e7b2dc0f62 (patch) | |
| tree | 4b75771ec02543372808c7df31a1a65e37fdb361 /arch/arm/oprofile/common.c | |
| parent | 756b0322e50aebc4b9afb4488a2d3f6c802b4e64 (diff) | |
| parent | 2b666ca4a68cbc22483b0f2e1ba3c0e59b01ae9e (diff) | |
Merge branch 'linus' into core/locking
Merge reason: Update to almost-final-.36
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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) |
