perf/arm_pmu_platform: Fix error handling
authorRobin Murphy <robin.murphy@arm.com>
Fri, 26 Mar 2021 16:02:41 +0000 (16:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:57:17 +0000 (10:57 +0200)
[ Upstream commit e338cb6bef254821a8c095018fd27254d74bfd6a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/arm_pmu_platform.c

index 4428852e1da17ec93788f9a275debf65e97f7cb3..bd5af219ca9b1980b17bc3a4cc721c2ff3956d13 100644 (file)
@@ -222,7 +222,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;