Message ID | 1401872880-23685-2-git-send-email-Julia.Lawall@lip6.fr (mailing list archive) |
---|---|
State | Awaiting Upstream |
Headers | show |
diff -u -p a/arch/sh/kernel/perf_event.c b/arch/sh/kernel/perf_event.c --- a/arch/sh/kernel/perf_event.c +++ b/arch/sh/kernel/perf_event.c @@ -281,7 +281,7 @@ static int sh_pmu_add(struct perf_event if (__test_and_set_bit(idx, cpuc->used_mask)) { idx = find_first_zero_bit(cpuc->used_mask, sh_pmu->num_events); - if (idx == sh_pmu->num_events) + if (idx >= sh_pmu->num_events) goto out; __set_bit(idx, cpuc->used_mask);