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

USB: serial: empeg: 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: Gary Brubaker <xavyer@ix.netcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+9 -5
+9 -5
drivers/usb/serial/empeg.c
··· 326 326 327 327 static void empeg_write_bulk_callback (struct urb *urb) 328 328 { 329 - struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 329 + struct usb_serial_port *port = urb->context; 330 + int status = urb->status; 330 331 331 332 dbg("%s - port %d", __FUNCTION__, port->number); 332 333 333 - if (urb->status) { 334 - dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 334 + if (status) { 335 + dbg("%s - nonzero write bulk status received: %d", 336 + __FUNCTION__, status); 335 337 return; 336 338 } 337 339 ··· 347 345 struct tty_struct *tty; 348 346 unsigned char *data = urb->transfer_buffer; 349 347 int result; 348 + int status = urb->status; 350 349 351 350 dbg("%s - port %d", __FUNCTION__, port->number); 352 351 353 - if (urb->status) { 354 - dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); 352 + if (status) { 353 + dbg("%s - nonzero read bulk status received: %d", 354 + __FUNCTION__, status); 355 355 return; 356 356 } 357 357