diff options
author | Steve French <sfrench@us.ibm.com> | 2006-03-07 21:47:30 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-03-07 21:47:30 +0000 |
commit | f6e77c94796edad172602234826a022d463d910e (patch) | |
tree | f5cb0848c9e848499b0f0676fafe7ff207538ae8 /drivers/usb/serial/usb-serial.c | |
parent | beb84dc8186662b17d5ea510fabb85cb7e266d33 (diff) | |
parent | d0b004840bd3b5ff2f2a0ad14fa0bd43349f5175 (diff) | |
download | kernel-crypto-f6e77c94796edad172602234826a022d463d910e.tar.gz kernel-crypto-f6e77c94796edad172602234826a022d463d910e.tar.xz kernel-crypto-f6e77c94796edad172602234826a022d463d910e.zip |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 4dd6865d32b..b5c96e74a90 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -242,8 +242,10 @@ static void serial_close(struct tty_struct *tty, struct file * filp) down(&port->sem); - if (port->open_count == 0) - goto out; + if (port->open_count == 0) { + up(&port->sem); + return; + } --port->open_count; if (port->open_count == 0) { @@ -260,10 +262,8 @@ static void serial_close(struct tty_struct *tty, struct file * filp) module_put(port->serial->type->driver.owner); } - kref_put(&port->serial->kref, destroy_serial); - -out: up(&port->sem); + kref_put(&port->serial->kref, destroy_serial); } static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) |