perf: Enable updating exclude_idle events at idle

Commit 573979dee2 ("perf: Add support for exclude_idle attribute")
does a register_idle_notifier call so that exclude_idle events
are updated when a CPU goes idle. This commit fixes a bug which
causes unregister_idle_notifier to be erroneously called.

Change-Id: I13dbd369c0ce137e884c156360c514df92746e39
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
This commit is contained in:
Patrick Fay 2016-09-21 17:02:30 -07:00
parent 9e2d528dc4
commit 54f6e4ae87

View file

@ -683,7 +683,7 @@ int armv8pmu_probe_num_events(struct arm_pmu *arm_pmu)
ret = smp_call_function_any(&arm_pmu->supported_cpus,
armv8pmu_read_num_pmnc_events,
&arm_pmu->num_events, 1);
if (!ret)
if (ret)
idle_notifier_unregister(&pmu_idle_nb->perf_cpu_idle_nb);
return ret;