Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
BACKPORT: perf/smmuv3: Remove the leftover put_cpu() in error path In…
Browse files Browse the repository at this point in the history
… smmu_pmu_probe(), there is put_cpu() in the error path, which is wrong because we use raw_smp_processor_id() to get the cpu ID, not get_cpu(), remove it.

While we are at it, kill 'out_cpuhp_err' altogether and
just return err if we fail to add the hotplug instance.

This patch is belongs to series patches to supports SMMUv3 PMU.

Backport from: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/perf?h=v5.6-rc1&id=8ae4bcf4821c18a8fbfa0b2c1df26c1085e9d923

Acked-by: Robin Murphy <[email protected]>
Acked-by: Will Deacon <[email protected]>
Signed-off-by: Hanjun Guo <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
tphan-ampere committed Jun 30, 2020
1 parent 9482e6e commit 43046fc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/perf/arm_smmuv3_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
if (err) {
dev_err(dev, "Error %d registering hotplug, PMU @%pa\n",
err, &res_0->start);
goto out_cpuhp_err;
return err;
}

err = perf_pmu_register(&smmu_pmu->pmu, name, -1);
Expand All @@ -800,8 +800,6 @@ static int smmu_pmu_probe(struct platform_device *pdev)

out_unregister:
cpuhp_state_remove_instance_nocalls(cpuhp_state_num, &smmu_pmu->node);
out_cpuhp_err:
put_cpu();
return err;
}

Expand Down

0 comments on commit 43046fc

Please sign in to comment.