perf/arm_pmu_platform: Fix error handling
authorRobin Murphy <robin.murphy@arm.com>
Fri, 26 Mar 2021 16:02:41 +0000 (16:02 +0000)
committerWill Deacon <will@kernel.org>
Tue, 30 Mar 2021 10:41:50 +0000 (11:41 +0100)
If we're aborting after failing to register the PMU device,
we probably don't want to leak the IRQs that we've claimed.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/53031a607fc8412a60024bfb3bb8cd7141f998f5.1616774562.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_pmu_platform.c

index bb6ae955083a32d955a90e6773a923dd80aecd2b..ef9676418c9f41661635510ef98bc041e60e9fb6 100644 (file)
@@ -235,7 +235,7 @@ int arm_pmu_device_probe(struct platform_device *pdev,
 
        ret = armpmu_register(pmu);
        if (ret)
-               goto out_free;
+               goto out_free_irqs;
 
        return 0;