summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-14 08:59:06 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-14 08:59:06 +0200
commitdb4e54aefdfe03f1aea82bb65d61f25c3ea035d7 (patch)
tree1a4b30dc2b6c8ac3173ff686b36f49dee5f0bd73 /drivers/tty
parenteab61fb1cc2eeeffbceb2cf891c1b7272141af82 (diff)
parent009c9aa5be652675a06d5211e1640e02bbb1c33d (diff)
Merge tag 'v5.13-rc6' into char-misc-next
We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_exar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 2f49c580139b..bd4e9f6ac29c 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -553,7 +553,11 @@ static void pci_xr17v35x_exit(struct pci_dev *pcidev)
{
struct exar8250 *priv = pci_get_drvdata(pcidev);
struct uart_8250_port *port = serial8250_get_port(priv->line[0]);
- struct platform_device *pdev = port->port.private_data;
+ struct platform_device *pdev;
+
+ pdev = port->port.private_data;
+ if (!pdev)
+ return;
device_remove_software_node(&pdev->dev);
platform_device_unregister(pdev);