USB: testing driver: don't free a locked mutex
Dopey thing to do and lockdep will (or should) warn.
Spotted by Daniel Walker.
Cc: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Daniel Walker <dwalker@mvista.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index e385135..f1b886c 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1992,8 +1992,6 @@
{
struct usbtest_dev *dev = usb_get_intfdata (intf);
- mutex_lock(&dev->lock);
-
usb_set_intfdata (intf, NULL);
dev_dbg (&intf->dev, "disconnect\n");
kfree (dev);