aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2009-05-11 15:24:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-15 21:44:45 -0700
commit87c1edd217a6742e48028db6664d7763de0449f6 (patch)
tree52dd981d6b2af6a10db8ec83b4b78d29a907a2c1 /drivers/usb/serial
parent715b1dc01fe44537e8fce9566e4bb48d6821d84b (diff)
USB: serial: ftd_sio usb: move status check
Alan Stern commented that the private driver counts must be updated regard less of the status return on the urb when the write call back is executed. This patch alters the behavior to update the private driver counts by simply moving the status check to after the driver count update. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/ftdi_sio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 74cc3c83160..fc527de7346 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1884,11 +1884,6 @@ static void ftdi_write_bulk_callback(struct urb *urb)
dbg("%s - port %d", __func__, port->number);
- if (status) {
- dbg("nonzero write bulk status received: %d", status);
- return;
- }
-
priv = usb_get_serial_port_data(port);
if (!priv) {
dbg("%s - bad port private data pointer - exiting", __func__);
@@ -1906,6 +1901,11 @@ static void ftdi_write_bulk_callback(struct urb *urb)
priv->tx_outstanding_bytes -= countback;
spin_unlock_irqrestore(&priv->tx_lock, flags);
+ if (status) {
+ dbg("nonzero write bulk status received: %d", status);
+ return;
+ }
+
usb_serial_port_softint(port);
} /* ftdi_write_bulk_callback */