aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ftdi_sio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-06-15 18:44:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:34:32 -0400
commit0fb0aa188d0e61d58485288071e73d3766513f2a (patch)
tree74ab866d57dc0636da5240cb1c3865b3afd3fdac /drivers/usb/serial/ftdi_sio.c
parent335202f44a9a68902a80e09ba33aa4eaddc9c8ed (diff)
USB: serial: ftdi_sio: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: <linux-usb-devel@lists.sourceforge.net> Cc: Kuba Ober <kuba@mareimbrium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r--drivers/usb/serial/ftdi_sio.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 3edd13f00982..4066a468118a 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1576,14 +1576,15 @@ static void ftdi_write_bulk_callback (struct urb *urb)
1576 struct ftdi_private *priv; 1576 struct ftdi_private *priv;
1577 int data_offset; /* will be 1 for the SIO and 0 otherwise */ 1577 int data_offset; /* will be 1 for the SIO and 0 otherwise */
1578 unsigned long countback; 1578 unsigned long countback;
1579 int status = urb->status;
1579 1580
1580 /* free up the transfer buffer, as usb_free_urb() does not do this */ 1581 /* free up the transfer buffer, as usb_free_urb() does not do this */
1581 kfree (urb->transfer_buffer); 1582 kfree (urb->transfer_buffer);
1582 1583
1583 dbg("%s - port %d", __FUNCTION__, port->number); 1584 dbg("%s - port %d", __FUNCTION__, port->number);
1584 1585
1585 if (urb->status) { 1586 if (status) {
1586 dbg("nonzero write bulk status received: %d", urb->status); 1587 dbg("nonzero write bulk status received: %d", status);
1587 return; 1588 return;
1588 } 1589 }
1589 1590
@@ -1659,6 +1660,7 @@ static void ftdi_read_bulk_callback (struct urb *urb)
1659 struct ftdi_private *priv; 1660 struct ftdi_private *priv;
1660 unsigned long countread; 1661 unsigned long countread;
1661 unsigned long flags; 1662 unsigned long flags;
1663 int status = urb->status;
1662 1664
1663 if (urb->number_of_packets > 0) { 1665 if (urb->number_of_packets > 0) {
1664 err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__, 1666 err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__,
@@ -1687,9 +1689,10 @@ static void ftdi_read_bulk_callback (struct urb *urb)
1687 err("%s - Not my urb!", __FUNCTION__); 1689 err("%s - Not my urb!", __FUNCTION__);
1688 } 1690 }
1689 1691
1690 if (urb->status) { 1692 if (status) {
1691 /* This will happen at close every time so it is a dbg not an err */ 1693 /* This will happen at close every time so it is a dbg not an err */
1692 dbg("(this is ok on close) nonzero read bulk status received: %d", urb->status); 1694 dbg("(this is ok on close) nonzero read bulk status received: "
1695 "%d", status);
1693 return; 1696 return;
1694 } 1697 }
1695 1698