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:
parent
e940e817a7
commit
c8246fefe2
|
@ -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);
|
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);
|
mutex_destroy(&s->mutex);
|
||||||
|
|
||||||
out_clk:
|
out_clk:
|
||||||
|
|
Loading…
Reference in New Issue