aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorGravatar Andy Shevchenko <andriy.shevchenko@linux.intel.com> 2024-05-03 20:15:53 +0300
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2024-05-04 18:09:29 +0200
commit53ea31bb6b8a132bb7994b1dd211d715f1b0c0d7 (patch)
tree529d849b87ef2714500355aa9df6cc20725ede35 /drivers/tty
parentMerge 6.9-rc5 into tty-next (diff)
downloadlinux-53ea31bb6b8a132bb7994b1dd211d715f1b0c0d7.tar.gz
linux-53ea31bb6b8a132bb7994b1dd211d715f1b0c0d7.tar.bz2
linux-53ea31bb6b8a132bb7994b1dd211d715f1b0c0d7.zip
serial: 8250_exar: Don't return positive values as error codes
PCI core may return positive codes for the specific errors. There is a special API to convert them to negative stanrard ones. Use that API to avoid returning positive values as error codes. Fixes: f7ce07062988 ("serial: exar: add CTI specific setup code") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Parker Newman <pnewman@connecttech.com> Link: https://lore.kernel.org/r/20240503171917.2921250-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_exar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 5e42558cbb01..9930668610ca 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -1162,12 +1162,12 @@ static int cti_board_init_fpga(struct exar8250 *priv, struct pci_dev *pcidev)
// Enable external interrupts in special cfg space register
ret = pci_read_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, &cfg_val);
if (ret)
- return ret;
+ return pcibios_err_to_errno(ret);
cfg_val |= CTI_FPGA_CFG_INT_EN_EXT_BIT;
ret = pci_write_config_word(pcidev, CTI_FPGA_CFG_INT_EN_REG, cfg_val);
if (ret)
- return ret;
+ return pcibios_err_to_errno(ret);
// RS485 gate needs to be enabled; otherwise RTS/CTS will not work
exar_write_reg(priv, CTI_FPGA_RS485_IO_REG, 0x01);