diff options
Diffstat (limited to 'drivers/serial/jsm/jsm_tty.c')
-rw-r--r-- | drivers/serial/jsm/jsm_tty.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index cd95e215550d..5673ca9dfdc8 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c | |||
@@ -432,7 +432,7 @@ int __devinit jsm_tty_init(struct jsm_board *brd) | |||
432 | 432 | ||
433 | int jsm_uart_port_init(struct jsm_board *brd) | 433 | int jsm_uart_port_init(struct jsm_board *brd) |
434 | { | 434 | { |
435 | int i; | 435 | int i, rc; |
436 | unsigned int line; | 436 | unsigned int line; |
437 | struct jsm_channel *ch; | 437 | struct jsm_channel *ch; |
438 | 438 | ||
@@ -467,8 +467,11 @@ int jsm_uart_port_init(struct jsm_board *brd) | |||
467 | } else | 467 | } else |
468 | set_bit(line, linemap); | 468 | set_bit(line, linemap); |
469 | brd->channels[i]->uart_port.line = line; | 469 | brd->channels[i]->uart_port.line = line; |
470 | if (uart_add_one_port (&jsm_uart_driver, &brd->channels[i]->uart_port)) | 470 | rc = uart_add_one_port (&jsm_uart_driver, &brd->channels[i]->uart_port); |
471 | printk(KERN_INFO "jsm: add device failed\n"); | 471 | if (rc){ |
472 | printk(KERN_INFO "jsm: Port %d failed. Aborting...\n", i); | ||
473 | return rc; | ||
474 | } | ||
472 | else | 475 | else |
473 | printk(KERN_INFO "jsm: Port %d added\n", i); | 476 | printk(KERN_INFO "jsm: Port %d added\n", i); |
474 | } | 477 | } |