drivers/*: mark variables with uninitialized_var()
[sfrench/cifs-2.6.git] / drivers / usb / misc / auerswald.c
index b5332e679c4644f86ed1ab0a45459ebf9810b04c..42d4e6454a77f3bfec9562bc41b44a85ab42afb8 100644 (file)
@@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time
        } else
                status = urb->status;
 
-       if (actual_length)
+       if (status >= 0)
                *actual_length = urb->actual_length;
 
        return status;
@@ -664,7 +664,7 @@ static int auerchain_control_msg (pauerchain_t acp, struct usb_device *dev, unsi
        int ret;
        struct usb_ctrlrequest *dr;
        struct urb *urb;
-        int length;
+        int uninitialized_var(length);
 
         dbg ("auerchain_control_msg");
         dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
@@ -1307,7 +1307,7 @@ static int auerswald_addservice (pauerswald_t cp, pauerscon_t scp)
 }
 
 
-/* remove a service from the the device
+/* remove a service from the device
    scp->id must be set! */
 static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp)
 {
@@ -1822,16 +1822,10 @@ static int auerchar_release (struct inode *inode, struct file *file)
        pauerswald_t cp;
        dbg("release");
 
-       /* get the mutexes */
-       if (down_interruptible (&ccp->mutex)) {
-               return -ERESTARTSYS;
-       }
+       down(&ccp->mutex);
        cp = ccp->auerdev;
        if (cp) {
-               if (down_interruptible (&cp->mutex)) {
-                       up (&ccp->mutex);
-                       return -ERESTARTSYS;
-               }
+               down(&cp->mutex);
                /* remove an open service */
                auerswald_removeservice (cp, &ccp->scontext);
                /* detach from device */
@@ -2040,12 +2034,12 @@ static void auerswald_disconnect (struct usb_interface *intf)
        if (!cp)
                return;
 
-       down (&cp->mutex);
-       info ("device /dev/%s now disconnecting", cp->name);
-
        /* give back our USB minor number */
        usb_deregister_dev(intf, &auerswald_class);
 
+       down (&cp->mutex);
+       info ("device /dev/%s now disconnecting", cp->name);
+
        /* Stop the interrupt endpoint */
        auerswald_int_release (cp);