All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe()
@ 2021-06-17 12:26 ` Jing Xiangfeng
  0 siblings, 0 replies; 6+ messages in thread
From: Jing Xiangfeng @ 2021-06-17 12:26 UTC (permalink / raw)
  To: Frank.li, will, mark.rutland, shawnguo, s.hauer, kernel,
	festevam, linux-imx
  Cc: linux-arm-kernel, linux-kernel, jingxiangfeng

ddr_perf_probe() misses to call ida_simple_remove() in an error path.
Jump to cpuhp_state_err to fix it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/perf/fsl_imx8_ddr_perf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c
index 2bbb93188064..7b87aaf267d5 100644
--- a/drivers/perf/fsl_imx8_ddr_perf.c
+++ b/drivers/perf/fsl_imx8_ddr_perf.c
@@ -705,8 +705,10 @@ static int ddr_perf_probe(struct platform_device *pdev)
 
 	name = devm_kasprintf(&pdev->dev, GFP_KERNEL, DDR_PERF_DEV_NAME "%d",
 			      num);
-	if (!name)
-		return -ENOMEM;
+	if (!name) {
+		ret = -ENOMEM;
+		goto cpuhp_state_err;
+	}
 
 	pmu->devtype_data = of_device_get_match_data(&pdev->dev);
 
-- 
2.26.0.106.g9fadedd


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-17 22:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 12:26 [PATCH] drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() Jing Xiangfeng
2021-06-17 12:26 ` Jing Xiangfeng
2021-06-17 12:24 ` Aisheng Dong
2021-06-17 12:24   ` Aisheng Dong
2021-06-17 22:38 ` Will Deacon
2021-06-17 22:38   ` 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.