Serial driver fix for 5.13-rc6

Here is 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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYMS7Tg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yktQwCgkmCvU3KoftPUO6oRFrj7S3sJn0YAoNYLprQU
 vaEojGhGWKIol/Cbsak9
 =6apf
 -----END PGP SIGNATURE-----

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()
This commit is contained in:
Linus Torvalds 2021-06-12 12:27:05 -07:00
commit c46fe4aa82
1 changed files with 5 additions and 1 deletions

View File

@ -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);