Message ID | 1a21fffe403d7181e0404db1ed92140c306f97b7.1713270624.git.pnewman@connecttech.com |
---|---|
State | New |
Headers | show |
Series | [v3,1/8] serial: exar: adding missing CTI and Exar PCI ids | expand |
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 501b9f3e9c89..f5a395ed69d1 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -1671,7 +1671,8 @@ static void exar_pci_remove(struct pci_dev *pcidev) unsigned int i; for (i = 0; i < priv->nr; i++) - serial8250_unregister_port(priv->line[i]); + if (priv->line[i] >= 0) + serial8250_unregister_port(priv->line[i]); /* Ensure that every init quirk is properly torn down */ if (priv->board->exit)