summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2015-03-17 00:28:46 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 22:38:36 +0100
commit11b03ea0c1ef1cd2df3e7ea0437a13e2dfb65f60 (patch)
tree404057d7051d97b0d24a1a697d814e8295d79f53 /drivers/tty
parent1cf94d3a115ad118a36cba2c9a5383acda94e544 (diff)
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sc16is7xx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index df9a384dfbda..11bb44039a57 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -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