aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJing Xiangfeng <[email protected]>2021-06-17 20:26:14 +0800
committerWill Deacon <[email protected]>2021-06-17 19:45:24 +0100
commitd96b1b8c9f79b6bb234a31c80972a6f422079376 (patch)
tree8b686b942170f7cac93d084986db2ebcba4deb3c
parent4e16f283edc289820e9b2d6f617ed8e514ee8396 (diff)
drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe()
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 <[email protected]> Reviewed-by: Dong Aisheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--drivers/perf/fsl_imx8_ddr_perf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c
index 2a1d78794a4e..94ebc1ecace7 100644
--- a/drivers/perf/fsl_imx8_ddr_perf.c
+++ b/drivers/perf/fsl_imx8_ddr_perf.c
@@ -702,8 +702,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);