aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/ir-usb.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 9d847f69291..8cec5e520d9 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -392,12 +392,14 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
392static void ir_write_bulk_callback (struct urb *urb) 392static void ir_write_bulk_callback (struct urb *urb)
393{ 393{
394 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 394 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
395 int status = urb->status;
395 396
396 dbg("%s - port %d", __FUNCTION__, port->number); 397 dbg("%s - port %d", __FUNCTION__, port->number);
397 398
398 port->write_urb_busy = 0; 399 port->write_urb_busy = 0;
399 if (urb->status) { 400 if (status) {
400 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 401 dbg("%s - nonzero write bulk status received: %d",
402 __FUNCTION__, status);
401 return; 403 return;
402 } 404 }
403 405
@@ -417,6 +419,7 @@ static void ir_read_bulk_callback (struct urb *urb)
417 struct tty_struct *tty; 419 struct tty_struct *tty;
418 unsigned char *data = urb->transfer_buffer; 420 unsigned char *data = urb->transfer_buffer;
419 int result; 421 int result;
422 int status = urb->status;
420 423
421 dbg("%s - port %d", __FUNCTION__, port->number); 424 dbg("%s - port %d", __FUNCTION__, port->number);
422 425
@@ -425,8 +428,7 @@ static void ir_read_bulk_callback (struct urb *urb)
425 return; 428 return;
426 } 429 }
427 430
428 switch (urb->status) { 431 switch (status) {
429
430 case 0: /* Successful */ 432 case 0: /* Successful */
431 433
432 /* 434 /*
@@ -490,7 +492,7 @@ static void ir_read_bulk_callback (struct urb *urb)
490 default: 492 default:
491 dbg("%s - nonzero read bulk status received: %d", 493 dbg("%s - nonzero read bulk status received: %d",
492 __FUNCTION__, 494 __FUNCTION__,
493 urb->status); 495 status);
494 break ; 496 break ;
495 497
496 } 498 }