Ilpo Järvinen wrote:
pci_{read,write}_config_*word() and pcie_capability_read_word() return PCIBIOS_* codes, not usual errnos.
Fix return value checks to handle PCIBIOS_* return codes correctly by dropping < 0 from the check and convert the PCIBIOS_* return codes into errnos using pcibios_err_to_errno() before returning them.
Fixes: ce17ad0d5498 ("cxl: Wait Memory_Info_Valid before access memory related info") Fixes: 34e37b4c432c ("cxl/port: Enable HDM Capability after validating DVSEC Ranges") Fixes: 14d788740774 ("cxl/mem: Consolidate CXL DVSEC Range enumeration in the core") Fixes: 560f78559006 ("cxl/pci: Retrieve CXL DVSEC memory info") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com
Reviewed-by: Ira Weiny ira.weiny@intel.com
[snip]