# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.579.9.6 -> 1.579.9.7 # drivers/usb/serial/usbserial.c 1.41 -> 1.42 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/23 stuartm@connecttech.com 1.579.9.7 # [PATCH] USB: clean up the error logic for open() in the usb-serial driver # # This cleans up the error path in the open() call to make a bit more # sense. # -------------------------------------------- # diff -Nru a/drivers/usb/serial/usbserial.c b/drivers/usb/serial/usbserial.c --- a/drivers/usb/serial/usbserial.c Mon Sep 23 15:15:52 2002 +++ b/drivers/usb/serial/usbserial.c Mon Sep 23 15:15:52 2002 @@ -557,12 +557,11 @@ retval = serial->type->open(port, filp); else retval = generic_open(port, filp); - } - - if (retval) { - port->open_count = 0; - if (serial->type->owner) - __MOD_DEC_USE_COUNT(serial->type->owner); + if (retval) { + port->open_count = 0; + if (serial->type->owner) + __MOD_DEC_USE_COUNT(serial->type->owner); + } } up (&port->sem);