* [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
@ 2021-12-17 14:59 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-12-17 14:59 UTC (permalink / raw)
To: Will Deacon, Bhaskara Budiredla
Cc: Mark Rutland, linux-arm-kernel, linux-kernel, kernel-janitors
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>
---
When you're adding a new driver please use the correct prefix for the
first commit:
Bad: subsystem: Add new driver for Fancy New Hardware
Good: subsystem/new_hdwr: Add new driver for Fancy New Hardware
Otherwise it's impossible to guess which prefix you prefer.
drivers/perf/marvell_cn10k_tad_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
@ 2021-12-17 14:59 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-12-17 14:59 UTC (permalink / raw)
To: Will Deacon, Bhaskara Budiredla
Cc: Mark Rutland, linux-arm-kernel, linux-kernel, kernel-janitors
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>
---
When you're adding a new driver please use the correct prefix for the
first commit:
Bad: subsystem: Add new driver for Fancy New Hardware
Good: subsystem/new_hdwr: Add new driver for Fancy New Hardware
Otherwise it's impossible to guess which prefix you prefer.
drivers/perf/marvell_cn10k_tad_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
2021-12-17 14:59 ` Dan Carpenter
@ 2022-01-05 17:31 ` Will Deacon
-1 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2022-01-05 17:31 UTC (permalink / raw)
To: Dan Carpenter, Bhaskara Budiredla
Cc: catalin.marinas, kernel-team, Will Deacon, kernel-janitors,
linux-arm-kernel, Mark Rutland, linux-kernel
On Fri, 17 Dec 2021 17:59:08 +0300, Dan Carpenter wrote:
> The devm_ioremap() function does not return error pointers. It returns
> NULL.
>
>
Applied to will (for-next/perf), thanks!
[1/1] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
https://git.kernel.org/will/c/2da56881a7f8
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
@ 2022-01-05 17:31 ` Will Deacon
0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2022-01-05 17:31 UTC (permalink / raw)
To: Dan Carpenter, Bhaskara Budiredla
Cc: catalin.marinas, kernel-team, Will Deacon, kernel-janitors,
linux-arm-kernel, Mark Rutland, linux-kernel
On Fri, 17 Dec 2021 17:59:08 +0300, Dan Carpenter wrote:
> The devm_ioremap() function does not return error pointers. It returns
> NULL.
>
>
Applied to will (for-next/perf), thanks!
[1/1] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check
https://git.kernel.org/will/c/2da56881a7f8
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-05 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 14:59 [PATCH] drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check Dan Carpenter
2021-12-17 14:59 ` Dan Carpenter
2022-01-05 17:31 ` Will Deacon
2022-01-05 17:31 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.