perf: arm_spe: Remove unnecessary zero check on 'nr_pages'

We already check that the 'nr_pages' is > 2, so there's no need to check
that it's != 0 later on.

Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
luanshi 2020-02-26 12:25:06 +08:00 committed by Will Deacon
parent f8788d86ab
commit aaa1972715

View File

@ -831,7 +831,7 @@ static void *arm_spe_pmu_setup_aux(struct perf_event *event, void **pages,
* parts and give userspace a fighting chance of getting some
* useful data out of it.
*/
if (!nr_pages || (snapshot && (nr_pages & 1)))
if (snapshot && (nr_pages & 1))
return NULL;
if (cpu == -1)