linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe()
@ 2021-03-12  8:04 'Wei Yongjun
  2021-03-12 11:44 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: 'Wei Yongjun @ 2021-03-12  8:04 UTC (permalink / raw)
  To: weiyongjun1, Will Deacon, Mark Rutland, Tuan Phan
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors, Hulk Robot

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 53c218da220c ("driver/perf: Add PMU driver for the ARM DMC-620 memory controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/perf/arm_dmc620_pmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/perf/arm_dmc620_pmu.c b/drivers/perf/arm_dmc620_pmu.c
index 66ad5b3ece19..f2a85500258d 100644
--- a/drivers/perf/arm_dmc620_pmu.c
+++ b/drivers/perf/arm_dmc620_pmu.c
@@ -681,6 +681,7 @@ static int dmc620_pmu_device_probe(struct platform_device *pdev)
 	if (!name) {
 		dev_err(&pdev->dev,
 			  "Create name failed, PMU @%pa\n", &res->start);
+		ret = -ENOMEM;
 		goto out_teardown_dev;
 	}
 


_______________________________________________
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] 2+ messages in thread

* Re: [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe()
  2021-03-12  8:04 [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() 'Wei Yongjun
@ 2021-03-12 11:44 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2021-03-12 11:44 UTC (permalink / raw)
  To: 'Wei Yongjun, Tuan Phan, Mark Rutland
  Cc: catalin.marinas, kernel-team, Will Deacon, Hulk Robot,
	linux-kernel, kernel-janitors, linux-arm-kernel

On Fri, 12 Mar 2021 08:04:21 +0000, 'Wei Yongjun wrote:
> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.

Applied to arm64 (for-next/fixes), thanks!

[1/1] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe()
      https://git.kernel.org/arm64/c/c8e386683652

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] 2+ messages in thread

end of thread, other threads:[~2021-03-12 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12  8:04 [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() 'Wei Yongjun
2021-03-12 11:44 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).