]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ata: pata_macio: Fix PCI region leak
authorPhilipp Stanner <phasta@kernel.org>
Tue, 10 Jun 2025 13:54:14 +0000 (15:54 +0200)
committerNiklas Cassel <cassel@kernel.org>
Wed, 11 Jun 2025 10:27:54 +0000 (12:27 +0200)
commit3e5378779091c2f9a96d4404066e1923c92ceb8b
tree484f71fd5e7364725fac089c0be4a1811fd9d92d
parentfe5b391fc56f77cf3c22a9dd4f0ce20db0e3533f
ata: pata_macio: Fix PCI region leak

pci_request_regions() became a managed devres functions if the PCI
device was enabled with pcim_enable_device(), which is the case for
pata_macio.

The PCI subsystem recently removed this hybrid feature from
pci_request_region(). When doing so, pata_macio was forgotten to be
ported to use pcim_request_all_regions(). If that function is not used,
pata_macio will fail on driver-reload because the PCI regions will
remain blocked.

Fix the region leak by replacing pci_request_regions() with its managed
counterpart, pcim_request_all_regions().

Fixes: 51f6aec99cb0 ("PCI: Remove hybrid devres nature from request functions")
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250610135413.35930-2-phasta@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/pata_macio.c