summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-12-14 01:15:34 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 23:34:57 +0100
commit26e109b0a90b5ef7b025e44a969836ab9a598ffc (patch)
treedf2117de26c53ab4137663107c699963968c20b9 /drivers/usb/misc
parentUSB: testing driver: convert dev->sem to mutex (diff)
downloadlinux-26e109b0a90b5ef7b025e44a969836ab9a598ffc.tar.xz
linux-26e109b0a90b5ef7b025e44a969836ab9a598ffc.zip
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>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/usbtest.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index e3851359d653..f1b886c204c0 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1992,8 +1992,6 @@ static void usbtest_disconnect (struct usb_interface *intf)
{
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);