Skip to content

Commit 2da5688

Browse files
Dan Carpenterwilldeacon
authored andcommitted
drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
The devm_ioremap() function does not return error pointers. It returns NULL. Fixes: 036a758 ("drivers: perf: Add LLC-TAD perf counter support") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/20211217145907.GA16611@kili Signed-off-by: Will Deacon <[email protected]>
1 parent 527a7f5 commit 2da5688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/perf/marvell_cn10k_tad_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static int tad_pmu_probe(struct platform_device *pdev)
312312
regions[i].base = devm_ioremap(&pdev->dev,
313313
res->start,
314314
tad_pmu_page_size);
315-
if (IS_ERR(regions[i].base)) {
315+
if (!regions[i].base) {
316316
dev_err(&pdev->dev, "TAD%d ioremap fail\n", i);
317317
return -ENOMEM;
318318
}

0 commit comments

Comments
 (0)