diff options
-rw-r--r-- | kernel/perf_event.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index bb06382f98e..180151ff837 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -664,13 +664,13 @@ group_sched_in(struct perf_event *group_event, } } - if (txn) { - ret = pmu->commit_txn(pmu); - if (!ret) { - pmu->cancel_txn(pmu); + if (!txn) + return 0; - return 0; - } + ret = pmu->commit_txn(pmu); + if (!ret) { + pmu->cancel_txn(pmu); + return 0; } group_error: |