From: Matt Schulte Date: Wed, 21 Nov 2012 16:39:18 +0000 (-0600) Subject: tty/8250 Add check for pci_ioremap_bar failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13c3237dbcc92fa7d17d3eb06de6477c4bd7fb5d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tty/8250 Add check for pci_ioremap_bar failure Add check for pci_ioremap_bar failure Signed-off-by: Matt Schulte Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index a795bd971eaa..26b9dc012ed0 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -1172,6 +1172,8 @@ pci_xr17v35x_setup(struct serial_private *priv, u8 __iomem *p; p = pci_ioremap_bar(priv->dev, 0); + if (p == NULL) + return -ENOMEM; port->port.flags |= UPF_EXAR_EFR;