mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
398a9db655
commit
5d14bba91d
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue