mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 19:24:02 +08:00
drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
The devm_ioremap() function does not return error pointers. It returns
NULL.
Fixes: 036a7584be
("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>
This commit is contained in:
parent
527a7f5252
commit
2da56881a7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user