Skip to content

Commit

Permalink
serial: 8250_pci: Check mapping in pci_ni8430_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaron Sierra authored and Greg Kroah-Hartman committed Nov 6, 2014
1 parent 398a9db commit 5d14bba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/tty/serial/8250/8250_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5d14bba

Please sign in to comment.