Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: serial: mct_u232: 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: Wolfgang Grandegger <wolfgang@ces.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+10 -7
+10 -7
drivers/usb/serial/mct_u232.c
··· 516 516 struct usb_serial *serial = port->serial; 517 517 struct tty_struct *tty; 518 518 unsigned char *data = urb->transfer_buffer; 519 - int status; 519 + int retval; 520 + int status = urb->status; 520 521 unsigned long flags; 521 522 522 - switch (urb->status) { 523 + switch (status) { 523 524 case 0: 524 525 /* success */ 525 526 break; ··· 528 527 case -ENOENT: 529 528 case -ESHUTDOWN: 530 529 /* this urb is terminated, clean up */ 531 - dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); 530 + dbg("%s - urb shutting down with status: %d", 531 + __FUNCTION__, status); 532 532 return; 533 533 default: 534 - dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); 534 + dbg("%s - nonzero urb status received: %d", 535 + __FUNCTION__, status); 535 536 goto exit; 536 537 } 537 538 ··· 597 594 #endif 598 595 spin_unlock_irqrestore(&priv->lock, flags); 599 596 exit: 600 - status = usb_submit_urb (urb, GFP_ATOMIC); 601 - if (status) 597 + retval = usb_submit_urb (urb, GFP_ATOMIC); 598 + if (retval) 602 599 err ("%s - usb_submit_urb failed with result %d", 603 - __FUNCTION__, status); 600 + __FUNCTION__, retval); 604 601 } /* mct_u232_read_int_callback */ 605 602 606 603 static void mct_u232_set_termios (struct usb_serial_port *port,