mirror of
https://github.com/adulau/aha.git
synced 2025-01-04 23:23:18 +00:00
USB: serial: navman: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0643c72435
commit
9965d61263
1 changed files with 4 additions and 3 deletions
|
@ -37,9 +37,10 @@ static void navman_read_int_callback(struct urb *urb)
|
||||||
struct usb_serial_port *port = urb->context;
|
struct usb_serial_port *port = urb->context;
|
||||||
unsigned char *data = urb->transfer_buffer;
|
unsigned char *data = urb->transfer_buffer;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
|
int status = urb->status;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
switch (urb->status) {
|
switch (status) {
|
||||||
case 0:
|
case 0:
|
||||||
/* success */
|
/* success */
|
||||||
break;
|
break;
|
||||||
|
@ -48,11 +49,11 @@ static void navman_read_int_callback(struct urb *urb)
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
/* this urb is terminated, clean up */
|
/* this urb is terminated, clean up */
|
||||||
dbg("%s - urb shutting down with status: %d",
|
dbg("%s - urb shutting down with status: %d",
|
||||||
__FUNCTION__, urb->status);
|
__FUNCTION__, status);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
dbg("%s - nonzero urb status received: %d",
|
dbg("%s - nonzero urb status received: %d",
|
||||||
__FUNCTION__, urb->status);
|
__FUNCTION__, status);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue