Skip to content

Commit

Permalink
drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit d96b1b8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
hiss2018 authored and gregkh committed Jul 14, 2021
1 parent 145b1fb commit 670fe60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/perf/fsl_imx8_ddr_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,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);

Expand Down

0 comments on commit 670fe60

Please sign in to comment.