Commit 57c87946 authored by Haotian Zhang's avatar Haotian Zhang Committed by Greg Kroah-Hartman
Browse files

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: default avatarHaotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251117040710.1544-1-vulab@iscas.ac.cn


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d3210c8e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1723,6 +1723,7 @@ static int icom_probe(struct pci_dev *dev,
	retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg);
	if (retval) {
		dev_err(&dev->dev, "PCI Config read FAILED\n");
		retval = pcibios_err_to_errno(retval);
		goto probe_exit0;
	}