OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cf94d3
)
sc16is7xx: remove ports on probe error path
author
Jakub Kicinski
<kubakici@wp.pl>
Mon, 16 Mar 2015 23:28:46 +0000
(
00:28
+0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 21:38:36 +0000
(22:38 +0100)
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>
drivers/tty/serial/sc16is7xx.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/sc16is7xx.c
b/drivers/tty/serial/sc16is7xx.c
index
df9a384
..
11bb440
100644
(file)
--- 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