1
0
Fork 0

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: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Jakub Kicinski 2015-03-17 00:28:46 +01:00 committed by Greg Kroah-Hartman
parent 1cf94d3a11
commit 11b03ea0c1
1 changed files with 3 additions and 0 deletions

View File

@ -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