Commit d49802b
perf/arm-cmn: Fix incorrect error check for devm_ioremap()
Check devm_ioremap() return value for NULL instead of ERR_PTR and return
-ENOMEM on failure. devm_ioremap() never returns ERR_PTR, using IS_ERR()
skips the error path and may cause a NULL pointer dereference.
Fixes: 5394396 ("perf/arm-cmn: Stop claiming entire iomem region")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Will Deacon <will@kernel.org>1 parent 2f89b7f commit d49802b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
2576 | | - | |
2577 | | - | |
| 2576 | + | |
| 2577 | + | |
2578 | 2578 | | |
2579 | 2579 | | |
2580 | 2580 | | |
| |||
0 commit comments