Skip to content

Commit d8bb447

Browse files
ISCAS-Vulabij-intel
authored andcommitted
platform/x86/intel/speed_select_if: Convert PCIBIOS_* return codes to errnos
isst_if_probe() uses pci_read_config_dword() that returns PCIBIOS_* codes. The return code is returned from the probe function as is but probe functions should return normal errnos. A proper implementation can be found in drivers/leds/leds-ss4200.c. Convert PCIBIOS_* return codes using pcibios_err_to_errno() into normal errno before returning. Fixes: d3a2358 ("platform/x86: ISST: Add Intel Speed Select mmio interface") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20251117033354.132-1-vulab@iscas.ac.cn Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent ddf5fff commit d8bb447

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ static int isst_if_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
108108

109109
ret = pci_read_config_dword(pdev, 0xD0, &mmio_base);
110110
if (ret)
111-
return ret;
111+
return pcibios_err_to_errno(ret);
112112

113113
ret = pci_read_config_dword(pdev, 0xFC, &pcu_base);
114114
if (ret)
115-
return ret;
115+
return pcibios_err_to_errno(ret);
116116

117117
pcu_base &= GENMASK(10, 0);
118118
base_addr = (u64)mmio_base << 23 | (u64) pcu_base << 12;

0 commit comments

Comments
 (0)