Skip to content

Commit c46fe4a

Browse files
committed
Merge tag 'tty-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull serial driver fix from Greg KH: "A single 8250_exar serial driver fix for a reported problem with a change that happened in 5.13-rc1. It has been in linux-next with no reported problems" * tag 'tty-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_exar: Avoid NULL pointer dereference at ->exit()
2 parents 0d50658 + 7c3e8d9 commit c46fe4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/tty/serial/8250/8250_exar.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,11 @@ static void pci_xr17v35x_exit(struct pci_dev *pcidev)
553553
{
554554
struct exar8250 *priv = pci_get_drvdata(pcidev);
555555
struct uart_8250_port *port = serial8250_get_port(priv->line[0]);
556-
struct platform_device *pdev = port->port.private_data;
556+
struct platform_device *pdev;
557+
558+
pdev = port->port.private_data;
559+
if (!pdev)
560+
return;
557561

558562
device_remove_software_node(&pdev->dev);
559563
platform_device_unregister(pdev);

0 commit comments

Comments
 (0)