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

USB: serial: omninet: 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>

+8 -5
+8 -5
drivers/usb/serial/omninet.c
··· 200 200 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 201 201 unsigned char *data = urb->transfer_buffer; 202 202 struct omninet_header *header = (struct omninet_header *) &data[0]; 203 - 203 + int status = urb->status; 204 204 int i; 205 205 int result; 206 206 207 207 dbg("%s - port %d", __FUNCTION__, port->number); 208 208 209 - if (urb->status) { 210 - dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); 209 + if (status) { 210 + dbg("%s - nonzero read bulk status received: %d", 211 + __FUNCTION__, status); 211 212 return; 212 213 } 213 214 ··· 312 311 { 313 312 /* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */ 314 313 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 314 + int status = urb->status; 315 315 316 316 dbg("%s - port %0x\n", __FUNCTION__, port->number); 317 317 318 318 port->write_urb_busy = 0; 319 - if (urb->status) { 320 - dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 319 + if (status) { 320 + dbg("%s - nonzero write bulk status received: %d", 321 + __FUNCTION__, status); 321 322 return; 322 323 } 323 324