mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 14:56:54 -04:00
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:
committed by
Greg Kroah-Hartman
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);
|
||||
|
||||
for (i = 0; i < devtype->nr; i++)
|
||||
uart_remove_one_port(&max310x_uart, &s->p[i].port);
|
||||
|
||||
mutex_destroy(&s->mutex);
|
||||
|
||||
out_clk:
|
||||
|
||||
Reference in New Issue
Block a user