提交 5d14bba9 编写于 作者: A Aaron Sierra 提交者: Greg Kroah-Hartman

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: NAaron Sierra <asierra@xes-inc.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 398a9db6
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册