]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
USB: misc: usblcd: clean up urb->status usage
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 20 Jul 2007 00:46:08 +0000 (17:46 -0700)
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/usblcd.c

index 504f7221b0d095e8847b902cc6e8955c6517172f..719842032712b68c0e42c22b16c58d57332a65a7 100644 (file)
@@ -176,16 +176,17 @@ static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
 static void lcd_write_bulk_callback(struct urb *urb)
 {
        struct usb_lcd *dev;
+       int status = urb->status;
 
        dev = (struct usb_lcd *)urb->context;
 
        /* sync/async unlink faults aren't errors */
-       if (urb->status &&
-           !(urb->status == -ENOENT ||
-             urb->status == -ECONNRESET ||
-              urb->status == -ESHUTDOWN)) {
+       if (status &&
+           !(status == -ENOENT ||
+             status == -ECONNRESET ||
+              status == -ESHUTDOWN)) {
                dbg("USBLCD: %s - nonzero write bulk status received: %d",
-                   __FUNCTION__, urb->status);
+                   __FUNCTION__, status);
        }
 
        /* free up our allocated buffer */