From 7dcc85cd9b7134bbcdc50dc14ccfc7c49f092506 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 15 Jun 2007 15:44:13 -0700 Subject: [PATCH] USB: serial: cyberjack: 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: Cc: Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/cyberjack.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 4167753ed31f..4353df92487f 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -305,12 +305,13 @@ static void cyberjack_read_int_callback( struct urb *urb ) struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct cyberjack_private *priv = usb_get_serial_port_data(port); unsigned char *data = urb->transfer_buffer; + int status = urb->status; int result; dbg("%s - port %d", __FUNCTION__, port->number); /* the urb might have been killed. */ - if (urb->status) + if (status) return; usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); @@ -365,12 +366,14 @@ static void cyberjack_read_bulk_callback (struct urb *urb) unsigned char *data = urb->transfer_buffer; short todo; int result; + int status = urb->status; dbg("%s - port %d", __FUNCTION__, port->number); - + usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); - if (urb->status) { - dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); + if (status) { + dbg("%s - nonzero read bulk status received: %d", + __FUNCTION__, status); return; } @@ -411,12 +414,14 @@ static void cyberjack_write_bulk_callback (struct urb *urb) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct cyberjack_private *priv = usb_get_serial_port_data(port); + int status = urb->status; dbg("%s - port %d", __FUNCTION__, port->number); port->write_urb_busy = 0; - if (urb->status) { - dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); + if (status) { + dbg("%s - nonzero write bulk status received: %d", + __FUNCTION__, status); return; }