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

Commit 11b03ea0 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Greg Kroah-Hartman
Browse files

sc16is7xx: remove ports on probe error path



If ports are not explicitly removed on the error path
the device will not get properly unregistered leaving
/dev/ttySC* nodes in the filesystem.

Signed-off-by: default avatarJakub Kicinski <kubakici@wp.pl>
Signed-off-by: default avatarJon Ringle <jringle@gridpoint.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cf94d3a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1120,6 +1120,9 @@ static int sc16is7xx_probe(struct device *dev,
	if (!ret)
		return 0;

	for (i = 0; i < s->uart.nr; i++)
		uart_remove_one_port(&s->uart, &s->p[i].port);

	mutex_destroy(&s->mutex);

#ifdef CONFIG_GPIOLIB