From: Andrew Morton Date: Fri, 14 Dec 2007 00:15:34 +0000 (-0800) Subject: USB: testing driver: don't free a locked mutex X-Git-Tag: v2.6.25-rc1~1075^2~61 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26e109b0a90b5ef7b025e44a969836ab9a598ffc;p=linux-2.6 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 Cc: Daniel Walker Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index e3851359d6..f1b886c204 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);