]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: cpqphp: Fix PCIBIOS_* return value confusion
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 22 Oct 2024 09:11:37 +0000 (12:11 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 22 Oct 2024 15:05:57 +0000 (10:05 -0500)
commite2226dbc4a4919d9c8bd9293299b532090bdf020
treeb60480f44538984472d6f9dd42c9e416fc8a4ed1
parent91a6296793591983f27db40f41daab53500ffc6e
PCI: cpqphp: Fix PCIBIOS_* return value confusion

Code in and related to PCI_RefinedAccessConfig() has three types of return
type confusion:

 - PCI_RefinedAccessConfig() tests pci_bus_read_config_dword() return value
   against -1.

 - PCI_RefinedAccessConfig() returns both -1 and PCIBIOS_* return codes.

 - Callers of PCI_RefinedAccessConfig() only test for -1.

Make PCI_RefinedAccessConfig() return PCIBIOS_* codes consistently and
adapt callers accordingly.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Link: https://lore.kernel.org/r/20241022091140.3504-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/cpqphp_pci.c