Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359375
b: refs/heads/master
c: 0e9c3be
h: refs/heads/master
i:
  359373: fc5ad23
  359371: 9818a0b
  359367: 12fee83
  359359: 5a16415
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent f0533b8 commit edb997b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: d228d9ec2c9a119ce15c6446ebeec05786ab3287
refs/heads/master: 0e9c3be20d88aa5ed13fde4ece50f45eb96824ad
10 changes: 3 additions & 7 deletions trunk/kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5965,13 +5965,9 @@ int perf_pmu_register(struct pmu *pmu, char *name, int type)
pmu->name = name;

if (type < 0) {
int err = idr_pre_get(&pmu_idr, GFP_KERNEL);
if (!err)
goto free_pdc;

err = idr_get_new_above(&pmu_idr, pmu, PERF_TYPE_MAX, &type);
if (err) {
ret = err;
type = idr_alloc(&pmu_idr, pmu, PERF_TYPE_MAX, 0, GFP_KERNEL);
if (type < 0) {
ret = type;
goto free_pdc;
}
}
Expand Down

0 comments on commit edb997b

Please sign in to comment.