Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164330
b: refs/heads/master
c: a1792cd
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 20, 2009
1 parent c4b4b6f commit 1ab6421
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 611a546bec3e1af2a87af0862398fc711dc47aef
refs/heads/master: a1792cdacaf5180e04e07811e220c4a3b4a9c33e
9 changes: 6 additions & 3 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,8 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
if (err)
return err;

counter->destroy = hw_perf_counter_destroy;

/*
* Generate PMC IRQs:
* (keep 'enabled' bit clear for now)
Expand Down Expand Up @@ -953,8 +955,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
return -EOPNOTSUPP;
}

counter->destroy = hw_perf_counter_destroy;

/*
* Raw event type provide the config in the event structure
*/
Expand Down Expand Up @@ -2107,8 +2107,11 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
int err;

err = __hw_perf_counter_init(counter);
if (err)
if (err) {
if (counter->destroy)
counter->destroy(counter);
return ERR_PTR(err);
}

return &pmu;
}
Expand Down

0 comments on commit 1ab6421

Please sign in to comment.