patch-2.4.10 linux/drivers/usb/mdc800.c

Next file: linux/drivers/usb/microtek.c
Previous file: linux/drivers/usb/kaweth.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/usb/mdc800.c linux/drivers/usb/mdc800.c
@@ -610,16 +610,18 @@
 	spin_lock (&mdc800->io_lock);
 	if (mdc800->open && (mdc800->state != NOT_CONNECTED))
 	{
-		mdc800->open=0;
+		spin_unlock(&mdc800->io_lock);
 		usb_unlink_urb (mdc800->irq_urb);
 		usb_unlink_urb (mdc800->write_urb);
 		usb_unlink_urb (mdc800->download_urb);
+		mdc800->open=0;
 	}
 	else
 	{
+		spin_unlock (&mdc800->io_lock);
 		retval=-EIO;
 	}
-	spin_unlock (&mdc800->io_lock);
+
 
 	return retval;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)