diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2016-06-07 15:59:26 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-25 20:55:35 (GMT) |
commit | c8246fefe2c995e128345614fb98b5ed5014318b (patch) | |
tree | c80d661214d2b7478302084bb7503b836c1112f1 /drivers/tty/serial/max310x.c | |
parent | e940e817a701dcaf0d218571c251af0cb6d1bbfb (diff) | |
download | linux-c8246fefe2c995e128345614fb98b5ed5014318b.tar.xz |
serial: max310x: Unregister UARTs on error
Add uart_remove_one_port() for error path.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/max310x.c')
-rw-r--r-- | drivers/tty/serial/max310x.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index e73ae6e..347f6e8 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -1234,6 +1234,9 @@ static int max310x_probe(struct device *dev, struct max310x_devtype *devtype, dev_err(dev, "Unable to reguest IRQ %i\n", irq); + for (i = 0; i < devtype->nr; i++) + uart_remove_one_port(&max310x_uart, &s->p[i].port); + mutex_destroy(&s->mutex); out_clk: |