Commit 26e109b0 authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1cfab028
...@@ -1992,8 +1992,6 @@ static void usbtest_disconnect (struct usb_interface *intf) ...@@ -1992,8 +1992,6 @@ static void usbtest_disconnect (struct usb_interface *intf)
{ {
struct usbtest_dev *dev = usb_get_intfdata (intf); struct usbtest_dev *dev = usb_get_intfdata (intf);
mutex_lock(&dev->lock);
usb_set_intfdata (intf, NULL); usb_set_intfdata (intf, NULL);
dev_dbg (&intf->dev, "disconnect\n"); dev_dbg (&intf->dev, "disconnect\n");
kfree (dev); kfree (dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment