Skip to content

Commit 57c8794

Browse files
ISCAS-Vulabgregkh
authored andcommitted
serial: icom: Convert PCIBIOS_* return codes to errnos
icom_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 them. Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20251117040710.1544-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d3210c8 commit 57c8794

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/tty/serial/icom.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,6 +1723,7 @@ static int icom_probe(struct pci_dev *dev,
17231723
retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg);
17241724
if (retval) {
17251725
dev_err(&dev->dev, "PCI Config read FAILED\n");
1726+
retval = pcibios_err_to_errno(retval);
17261727
goto probe_exit0;
17271728
}
17281729

0 commit comments

Comments
 (0)