Commit d96b1b8c authored by Jing Xiangfeng's avatar Jing Xiangfeng Committed by Will Deacon
Browse files

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: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Link: https://lore.kernel.org/r/20210617122614.166823-1-jingxiangfeng@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 4e16f283
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);