Skip to content

Commit d96b1b8

Browse files
hiss2018willdeacon
authored andcommitted
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 <jingxiangfeng@huawei.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Link: https://lore.kernel.org/r/20210617122614.166823-1-jingxiangfeng@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 4e16f28 commit d96b1b8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/perf/fsl_imx8_ddr_perf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,10 @@ static int ddr_perf_probe(struct platform_device *pdev)
702702

703703
name = devm_kasprintf(&pdev->dev, GFP_KERNEL, DDR_PERF_DEV_NAME "%d",
704704
num);
705-
if (!name)
706-
return -ENOMEM;
705+
if (!name) {
706+
ret = -ENOMEM;
707+
goto cpuhp_state_err;
708+
}
707709

708710
pmu->devtype_data = of_device_get_match_data(&pdev->dev);
709711

0 commit comments

Comments
 (0)