aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorOlivier Blin <blino@mandriva.com>2008-08-08 15:01:41 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-08-14 04:43:46 -0400
commit6d558a52ba295fc1c281c671d7daab2f74ddb4f2 (patch)
treed16d3ad63cc9e0b5def6e313ac3657959597a4ff /drivers/net/usb
parentadd477df674db00377d9a4dc0d9b553ce79bc06d (diff)
hso: fix refcounting on the ttyHSx devices
The references on ttyHSx devices were not decremented correctly when the tty was closed. The helper freeing the serial devices was never called because of that, and the module left some dangling sysfs devices after being unloaded. Signed-off-by: Olivier Blin <blino@mandriva.com> Cc: Jari Tenhunen <jari.tenhunen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/hso.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 94a27f764e6b..94c41bbedee9 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1103,8 +1103,8 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
1103 /* reset the rts and dtr */ 1103 /* reset the rts and dtr */
1104 /* do the actual close */ 1104 /* do the actual close */
1105 serial->open_count--; 1105 serial->open_count--;
1106 kref_put(&serial->parent->ref, hso_serial_ref_free);
1106 if (serial->open_count <= 0) { 1107 if (serial->open_count <= 0) {
1107 kref_put(&serial->parent->ref, hso_serial_ref_free);
1108 serial->open_count = 0; 1108 serial->open_count = 0;
1109 if (serial->tty) { 1109 if (serial->tty) {
1110 serial->tty->driver_data = NULL; 1110 serial->tty->driver_data = NULL;