[PATCH] perf: check return value of armpmu_request_irq()

Ren Yu posted 1 patch 4 years ago
drivers/perf/arm_pmu_acpi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] perf: check return value of armpmu_request_irq()
Posted by Ren Yu 4 years ago
When the function armpmu_request_irq() failed, goto err

Signed-off-by: Ren Yu <renyu@nfschina.com>
---
 drivers/perf/arm_pmu_acpi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
index f5c7a845cd7b..96ffadd654ff 100644
--- a/drivers/perf/arm_pmu_acpi.c
+++ b/drivers/perf/arm_pmu_acpi.c
@@ -159,7 +159,9 @@ static int arm_pmu_acpi_parse_irqs(void)
 		 * them with their PMUs.
 		 */
 		per_cpu(pmu_irqs, cpu) = irq;
-		armpmu_request_irq(irq, cpu);
+		err = armpmu_request_irq(irq, cpu);
+		if (err)
+			goto out_err;
 	}
 
 	return 0;
-- 
2.25.1
Re: [PATCH] perf: check return value of armpmu_request_irq()
Posted by Will Deacon 4 years ago
On Mon, 25 Apr 2022 18:04:36 +0800, Ren Yu wrote:
> When the function armpmu_request_irq() failed, goto err
> 
> 

Applied to will (for-next/perf), thanks!

[1/1] perf: check return value of armpmu_request_irq()
      https://git.kernel.org/will/c/4b5b7129095b

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev