projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5967a19
)
perf: arm-ni: Fix an NULL vs IS_ERR() bug
author
Dan Carpenter
<dan.carpenter@linaro.org>
Wed, 11 Sep 2024 07:39:59 +0000
(10:39 +0300)
committer
Will Deacon
<will@kernel.org>
Thu, 12 Sep 2024 11:49:33 +0000
(12:49 +0100)
The devm_ioremap() function never returns error pointers, it returns a
NULL pointer if there is an error.
Fixes:
4d5a7680f2b4
("perf: Add driver for Arm NI-700 interconnect PMU")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link:
https://lore.kernel.org/r/04d6ccc3-6d31-4f0f-ab0f-7a88342cc09a@stanley.mountain
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-ni.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/perf/arm-ni.c
b/drivers/perf/arm-ni.c
index b72df3aea93e3388c44c22f739a9233162ce6a07..90fcfe693439ef3e18e23c6351433ac3c5ea78b5 100644
(file)
--- a/
drivers/perf/arm-ni.c
+++ b/
drivers/perf/arm-ni.c
@@
-603,8
+603,8
@@
static int arm_ni_probe(struct platform_device *pdev)
*/
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
- if (
IS_ERR(base)
)
- return
PTR_ERR(base)
;
+ if (
!base
)
+ return
-ENOMEM
;
arm_ni_probe_domain(base, &cfg);
if (cfg.type != NI_GLOBAL)