summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAaron Sierra <asierra@xes-inc.com>2014-10-30 19:49:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 14:57:25 -0800
commit5d14bba91d8c350b21d28834fab95f67a46a264e (patch)
tree784ed6775886e05e2d783c5405b9be318b4dcee3 /drivers/tty
parent398a9db655efcc208285997c351fe73702735d88 (diff)
downloadlinux-stable-5d14bba91d8c350b21d28834fab95f67a46a264e.tar.gz
linux-stable-5d14bba91d8c350b21d28834fab95f67a46a264e.tar.bz2
linux-stable-5d14bba91d8c350b21d28834fab95f67a46a264e.zip
serial: 8250_pci: Check mapping in pci_ni8430_init
Check the return value of ioremap_nocache to make sure we got a valid mapping. Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 50f75703fd54..003679fc884b 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -757,6 +757,8 @@ pci_ni8430_setup(struct serial_private *priv,
offset += idx * board->uart_offset;
p = pci_ioremap_bar(dev, bar);
+ if (!p)
+ return -ENOMEM;
/* enable the transceiver */
writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,