Browse Source

tty/8250 Add check for pci_ioremap_bar failure

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>
Matt Schulte 12 years ago
parent
commit
13c3237dbc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/tty/serial/8250/8250_pci.c

+ 2 - 0
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;