summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2016-06-07 18:59:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-25 13:55:35 -0700
commitc8246fefe2c995e128345614fb98b5ed5014318b (patch)
treec80d661214d2b7478302084bb7503b836c1112f1
parente940e817a701dcaf0d218571c251af0cb6d1bbfb (diff)
downloadblackbird-op-linux-c8246fefe2c995e128345614fb98b5ed5014318b.tar.gz
blackbird-op-linux-c8246fefe2c995e128345614fb98b5ed5014318b.zip
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>
-rw-r--r--drivers/tty/serial/max310x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index e73ae6e79b64..347f6e8dae39 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:
OpenPOWER on IntegriCloud