Skip to content

Commit

Permalink
USB: testing driver: don't free a locked mutex
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent 1cfab02 commit 26e109b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/usb/misc/usbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 26e109b

Please sign in to comment.