Commit aaa19727 authored by luanshi's avatar luanshi Committed by Will Deacon
Browse files

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: default avatarLiguang Zhang <zhangliguang@linux.alibaba.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent f8788d86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)