diff options
| -rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index aa0166b6d450..116436b7fa52 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
| @@ -5642,17 +5642,15 @@ static pci_ers_result_t serial8250_io_slot_reset(struct pci_dev *dev) | |||
| 5642 | static void serial8250_io_resume(struct pci_dev *dev) | 5642 | static void serial8250_io_resume(struct pci_dev *dev) |
| 5643 | { | 5643 | { |
| 5644 | struct serial_private *priv = pci_get_drvdata(dev); | 5644 | struct serial_private *priv = pci_get_drvdata(dev); |
| 5645 | const struct pciserial_board *board; | 5645 | struct serial_private *new; |
| 5646 | 5646 | ||
| 5647 | if (!priv) | 5647 | if (!priv) |
| 5648 | return; | 5648 | return; |
| 5649 | 5649 | ||
| 5650 | board = priv->board; | 5650 | new = pciserial_init_ports(dev, priv->board); |
| 5651 | kfree(priv); | 5651 | if (!IS_ERR(new)) { |
| 5652 | priv = pciserial_init_ports(dev, board); | 5652 | pci_set_drvdata(dev, new); |
| 5653 | 5653 | kfree(priv); | |
| 5654 | if (!IS_ERR(priv)) { | ||
| 5655 | pci_set_drvdata(dev, priv); | ||
| 5656 | } | 5654 | } |
| 5657 | } | 5655 | } |
| 5658 | 5656 | ||
