diff options
author | Jakub Kicinski <kubakici@wp.pl> | 2015-03-17 00:28:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 22:38:36 +0100 |
commit | 11b03ea0c1ef1cd2df3e7ea0437a13e2dfb65f60 (patch) | |
tree | 404057d7051d97b0d24a1a697d814e8295d79f53 /drivers/tty | |
parent | 1cf94d3a115ad118a36cba2c9a5383acda94e544 (diff) | |
download | linux-11b03ea0c1ef1cd2df3e7ea0437a13e2dfb65f60.tar.gz linux-11b03ea0c1ef1cd2df3e7ea0437a13e2dfb65f60.tar.xz |
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.c | 3 |
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 |