projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
398a9db
)
serial: 8250_pci: Check mapping in pci_ni8430_init
author
Aaron Sierra
<asierra@xes-inc.com>
Fri, 31 Oct 2014 00:49:52 +0000
(19:49 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 22:57:25 +0000
(14:57 -0800)
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>
drivers/tty/serial/8250/8250_pci.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/8250/8250_pci.c
b/drivers/tty/serial/8250/8250_pci.c
index 50f75703fd54e9dbcdb4d5f1066d514b8dcda7ef..003679fc884bf18a0b609742ce9387ceb9fe8803 100644
(file)
--- 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,