linux-stable/drivers/perf
Hao Chen 2fcffaaf52 drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset()
[ Upstream commit 582c1aeee0 ]

pci_alloc_irq_vectors() allocates an irq vector. When devm_add_action()
fails, the irq vector is not freed, which leads to a memory leak.

Replace the devm_add_action with devm_add_action_or_reset to ensure
the irq vector can be destroyed when it fails.

Fixes: 66637ab137 ("drivers/perf: hisi: add driver for HNS3 PMU")
Signed-off-by: Hao Chen <chenhao418@huawei.com>
Signed-off-by: Junhao He <hejunhao3@huawei.com>
Reviewed-by: Jijie Shao <shaojijie@huawei.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240425124627.13764-4-hejunhao3@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-30 09:49:17 +02:00
..
amlogic perf/amlogic: add missing MODULE_DEVICE_TABLE 2023-10-17 12:36:12 +01:00
arm_cspmu perf: arm_cspmu: drop redundant acpi_dev_uid_to_integer() 2023-12-06 18:02:37 +01:00
hisilicon drivers/perf: hisi: hns3: Actually use devm_add_action_or_reset() 2024-05-30 09:49:17 +02:00
Kconfig drivers/perf: add DesignWare PCIe PMU driver 2023-12-13 15:35:28 +00:00
Makefile drivers/perf: add DesignWare PCIe PMU driver 2023-12-13 15:35:28 +00:00
alibaba_uncore_drw_pmu.c driver/perf: Add identifier sysfs file for Yitian 710 DDR 2023-07-27 12:57:04 +01:00
apple_m1_cpu_pmu.c arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs 2023-12-12 09:46:22 +00:00
arm-cci.c drivers/perf: Explicitly include correct DT includes 2023-07-27 13:02:23 +01:00
arm-ccn.c drivers/perf:Directly use ida_alloc()/free() 2022-06-23 15:44:45 +01:00
arm-cmn.c perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count) 2024-02-09 17:14:04 +00:00
arm_dmc620_pmu.c Revert "perf/arm_dmc620: Remove duplicate format attribute #defines" 2023-12-13 09:47:52 +00:00
arm_dsu_pmu.c drivers/perf: arm_dsu_pmu: Remove kerneldoc-style comment syntax 2023-12-12 09:26:38 +00:00
arm_pmu.c arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs 2023-12-12 09:46:22 +00:00
arm_pmu_acpi.c arm_pmu: acpi: Add a representative platform device for TRBE 2023-08-18 18:07:10 +01:00
arm_pmu_platform.c drivers/perf: Explicitly include correct DT includes 2023-07-27 13:02:23 +01:00
arm_pmuv3.c arm64: perf: Add support for event counting threshold 2023-12-12 09:46:22 +00:00
arm_smmuv3_pmu.c perf/smmuv3: Add MODULE_ALIAS for module auto loading 2023-08-15 12:53:04 +01:00
arm_spe_pmu.c arm: pmu: Share user ABI format mechanism with SPE 2023-12-12 09:46:22 +00:00
cxl_pmu.c perf: CXL: fix CPMU filter value mask length 2024-02-20 12:04:07 +00:00
dwc_pcie_pmu.c drivers/perf: add DesignWare PCIe PMU driver 2023-12-13 15:35:28 +00:00
fsl_imx8_ddr_perf.c perf: fsl_imx8_ddr: Add driver support for i.MX8DXL DDR Perf 2023-12-05 14:12:08 +00:00
fsl_imx9_ddr_perf.c drivers/perf: Remove usage of the deprecated ida_simple_xx() API 2023-12-12 09:20:38 +00:00
marvell_cn10k_ddr_pmu.c drivers/perf: Explicitly include correct DT includes 2023-07-27 13:02:23 +01:00
marvell_cn10k_tad_pmu.c drivers/perf: Explicitly include correct DT includes 2023-07-27 13:02:23 +01:00
qcom_l2_pmu.c perf: qcom_l2_pmu: Make l2_cache_pmu_probe_cluster() more robust 2023-06-05 15:01:27 +01:00
qcom_l3_pmu.c perf: qcom: use acpi_device_uid() for fetching _UID 2023-10-20 19:21:14 +02:00
riscv_pmu.c drivers/perf: riscv: Disable PERF_SAMPLE_BRANCH_* while not supported 2024-04-10 16:38:10 +02:00
riscv_pmu_legacy.c drivers: perf: ctr_get_width function for legacy is not defined 2024-02-27 12:55:36 -08:00
riscv_pmu_sbi.c perf: RISCV: Fix panic on pmu overflow handler 2024-02-29 10:20:00 -08:00
thunderx2_pmu.c
xgene_pmu.c drivers/perf: xgene: Use device_get_match_data() 2023-10-17 12:43:13 +01:00