]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:05 +0000 (19:51 +0100)
commitb5cf7ba111c231e92646b6fd12a3a6711e483e2d
tree93b9fa64e8430e130740699e60d1382aa81db7cd
parent48597c484b826d2d5c202dba5c27bd9345bd7004
PCI: cpqphp: Fix PCIBIOS_* return value confusion

[ Upstream commit e2226dbc4a4919d9c8bd9293299b532090bdf020 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/hotplug/cpqphp_pci.c