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>
This commit is contained in:
Alexander Shiyan 2016-06-07 18:59:26 +03:00 committed by Greg Kroah-Hartman
parent e940e817a7
commit c8246fefe2
1 changed files with 3 additions and 0 deletions

View 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: