diff options
author | luanshi <zhangliguang@linux.alibaba.com> | 2020-02-26 05:25:06 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-03-02 12:27:21 +0100 |
commit | aaa19727159ef5616219a4b9dad7a84e693aebf5 (patch) | |
tree | 86bed34b6447f8c2da24327845958e83192dbfe6 /drivers/perf | |
parent | Linux 5.6-rc3 (diff) | |
download | linux-aaa19727159ef5616219a4b9dad7a84e693aebf5.tar.xz linux-aaa19727159ef5616219a4b9dad7a84e693aebf5.zip |
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>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_spe_pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 4e4984a55cd1..b72c04852599 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -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) |