Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8246fef authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Greg Kroah-Hartman
Browse files

serial: max310x: Unregister UARTs on error



Add uart_remove_one_port() for error path.

Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e940e817
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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: