summaryrefslogtreecommitdiff
path: root/drivers/perf/marvell_cn10k_tad_pmu.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-12-17 17:59:08 +0300
committerWill Deacon <will@kernel.org>2022-01-04 16:58:17 +0300
commit2da56881a7f8fdd887e6c2d250db58f1abdad0b6 (patch)
tree8481af3442930bad8674a97b00ea54bfff56a3a0 /drivers/perf/marvell_cn10k_tad_pmu.c
parent527a7f52529fd661d200e6c4412b6d2528d1a6e8 (diff)
downloadlinux-2da56881a7f8fdd887e6c2d250db58f1abdad0b6.tar.xz
drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
The devm_ioremap() function does not return error pointers. It returns NULL. Fixes: 036a7584bede ("drivers: perf: Add LLC-TAD perf counter support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211217145907.GA16611@kili Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/marvell_cn10k_tad_pmu.c')
-rw-r--r--drivers/perf/marvell_cn10k_tad_pmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/marvell_cn10k_tad_pmu.c b/drivers/perf/marvell_cn10k_tad_pmu.c
index 250dd4c52d70..7f4d292658e3 100644
--- a/drivers/perf/marvell_cn10k_tad_pmu.c
+++ b/drivers/perf/marvell_cn10k_tad_pmu.c
@@ -312,7 +312,7 @@ static int tad_pmu_probe(struct platform_device *pdev)
regions[i].base = devm_ioremap(&pdev->dev,
res->start,
tad_pmu_page_size);
- if (IS_ERR(regions[i].base)) {
+ if (!regions[i].base) {
dev_err(&pdev->dev, "TAD%d ioremap fail\n", i);
return -ENOMEM;
}