Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Haotian Zhang and committed by
Greg Kroah-Hartman
57c87946 d3210c8e

+1
+1
drivers/tty/serial/icom.c
··· 1723 1723 retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg); 1724 1724 if (retval) { 1725 1725 dev_err(&dev->dev, "PCI Config read FAILED\n"); 1726 + retval = pcibios_err_to_errno(retval); 1726 1727 goto probe_exit0; 1727 1728 } 1728 1729