tty/8250 Add check for pci_ioremap_bar failure
authorMatt Schulte <matts@commtech-fastcom.com>
Wed, 21 Nov 2012 16:39:18 +0000 (10:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Nov 2012 00:31:18 +0000 (16:31 -0800)
Add check for pci_ioremap_bar failure

Signed-off-by: Matt Schulte <matts@commtech-fastcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_pci.c

index a795bd971eaa8efe532e4810fba02f18ef3027d2..26b9dc012ed0b64ec1f1b3807b573af0f5f82b91 100644 (file)
@@ -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;