aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cyberjack.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r--drivers/usb/serial/cyberjack.c17
1 files 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 )
305 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 305 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
306 struct cyberjack_private *priv = usb_get_serial_port_data(port); 306 struct cyberjack_private *priv = usb_get_serial_port_data(port);
307 unsigned char *data = urb->transfer_buffer; 307 unsigned char *data = urb->transfer_buffer;
308 int status = urb->status;
308 int result; 309 int result;
309 310
310 dbg("%s - port %d", __FUNCTION__, port->number); 311 dbg("%s - port %d", __FUNCTION__, port->number);
311 312
312 /* the urb might have been killed. */ 313 /* the urb might have been killed. */
313 if (urb->status) 314 if (status)
314 return; 315 return;
315 316
316 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 317 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)
365 unsigned char *data = urb->transfer_buffer; 366 unsigned char *data = urb->transfer_buffer;
366 short todo; 367 short todo;
367 int result; 368 int result;
369 int status = urb->status;
368 370
369 dbg("%s - port %d", __FUNCTION__, port->number); 371 dbg("%s - port %d", __FUNCTION__, port->number);
370 372
371 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 373 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
372 if (urb->status) { 374 if (status) {
373 dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); 375 dbg("%s - nonzero read bulk status received: %d",
376 __FUNCTION__, status);
374 return; 377 return;
375 } 378 }
376 379
@@ -411,12 +414,14 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
411{ 414{
412 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 415 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
413 struct cyberjack_private *priv = usb_get_serial_port_data(port); 416 struct cyberjack_private *priv = usb_get_serial_port_data(port);
417 int status = urb->status;
414 418
415 dbg("%s - port %d", __FUNCTION__, port->number); 419 dbg("%s - port %d", __FUNCTION__, port->number);
416 420
417 port->write_urb_busy = 0; 421 port->write_urb_busy = 0;
418 if (urb->status) { 422 if (status) {
419 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 423 dbg("%s - nonzero write bulk status received: %d",
424 __FUNCTION__, status);
420 return; 425 return;
421 } 426 }
422 427