]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe
authorThippeswamy Havalige <thippeswamy.havalige@amd.com>
Mon, 24 Feb 2025 15:50:22 +0000 (21:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:16 +0000 (14:39 +0200)
commit02e94069c3e9d2e59009663f83412c1bf3f230cc
tree1f3862a01e1a7c4d112918515d96b86d55bdae56
parent362b5879a7f33c9684955502b3b1212aa995d529
PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe

[ Upstream commit 57b0302240741e73fe51f88404b3866e0d2933ad ]

The IRQ domain allocated for the PCIe controller is not freed if
resource_list_first_type() returns NULL, leading to a resource leak.

This fix ensures properly cleaning up the allocated IRQ domain in
the error path.

Fixes: 49e427e6bdd1 ("Merge branch 'pci/host-probe-refactor'")
Signed-off-by: Thippeswamy Havalige <thippeswamy.havalige@amd.com>
[kwilczynski: added missing Fixes: tag, refactored to use one of the goto labels]
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Link: https://lore.kernel.org/r/20250224155025.782179-2-thippeswamy.havalige@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pcie-xilinx-cpm.c