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

USB: serial: ipw: 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: Roelf Diedericks <roelfd@inet.co.za>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


+8 -4
+8 -4
drivers/usb/serial/ipw.c
··· 167 167 unsigned char *data = urb->transfer_buffer; 168 168 struct tty_struct *tty; 169 169 int result; 170 + int status = urb->status; 170 171 171 172 dbg("%s - port %d", __FUNCTION__, port->number); 172 173 173 - if (urb->status) { 174 - dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); 174 + if (status) { 175 + dbg("%s - nonzero read bulk status received: %d", 176 + __FUNCTION__, status); 175 177 return; 176 178 } 177 179 ··· 371 369 static void ipw_write_bulk_callback(struct urb *urb) 372 370 { 373 371 struct usb_serial_port *port = urb->context; 372 + int status = urb->status; 374 373 375 374 dbg("%s", __FUNCTION__); 376 375 377 376 port->write_urb_busy = 0; 378 377 379 - if (urb->status) 380 - dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 378 + if (status) 379 + dbg("%s - nonzero write bulk status received: %d", 380 + __FUNCTION__, status); 381 381 382 382 usb_serial_port_softint(port); 383 383 }