]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: max310x: Unregister UARTs on error
authorAlexander Shiyan <shc_work@mail.ru>
Tue, 7 Jun 2016 15:59:26 +0000 (18:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2016 20:55:35 +0000 (13:55 -0700)
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>
drivers/tty/serial/max310x.c

index e73ae6e79b6491468a5f673b141d5b0f3e2c7151..347f6e8dae390291ee0a2810cf8ad44db16fd9e6 100644 (file)
@@ -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: